|
Lines 81-87
sub get_login_shib {
Link Here
|
| 81 |
|
81 |
|
| 82 |
my $matchAttribute = $config->{mapping}->{ $config->{matchpoint} }->{is}; |
82 |
my $matchAttribute = $config->{mapping}->{ $config->{matchpoint} }->{is}; |
| 83 |
|
83 |
|
| 84 |
if ( any { /(^psgi\.|^plack\.)/i } keys %ENV ) { |
84 |
if ( C4::Context::psgi_env ) { |
| 85 |
return $ENV{"HTTP_".uc($matchAttribute)} || ''; |
85 |
return $ENV{"HTTP_".uc($matchAttribute)} || ''; |
| 86 |
} else { |
86 |
} else { |
| 87 |
return $ENV{$matchAttribute} || ''; |
87 |
return $ENV{$matchAttribute} || ''; |
|
Lines 126-132
sub _autocreate {
Link Here
|
| 126 |
my %borrower = ( $config->{matchpoint} => $match ); |
126 |
my %borrower = ( $config->{matchpoint} => $match ); |
| 127 |
|
127 |
|
| 128 |
while ( my ( $key, $entry ) = each %{$config->{'mapping'}} ) { |
128 |
while ( my ( $key, $entry ) = each %{$config->{'mapping'}} ) { |
| 129 |
if ( any { /(^psgi\.|^plack\.)/i } keys %ENV ) { |
129 |
if ( C4::Context::psgi_env ) { |
| 130 |
$borrower{$key} = ( $entry->{'is'} && $ENV{"HTTP_" . uc($entry->{'is'}) } ) || $entry->{'content'} || ''; |
130 |
$borrower{$key} = ( $entry->{'is'} && $ENV{"HTTP_" . uc($entry->{'is'}) } ) || $entry->{'content'} || ''; |
| 131 |
} else { |
131 |
} else { |
| 132 |
$borrower{$key} = ( $entry->{'is'} && $ENV{ $entry->{'is'} } ) || $entry->{'content'} || ''; |
132 |
$borrower{$key} = ( $entry->{'is'} && $ENV{ $entry->{'is'} } ) || $entry->{'content'} || ''; |
|
Lines 144-150
sub _sync {
Link Here
|
| 144 |
my %borrower; |
144 |
my %borrower; |
| 145 |
$borrower{'borrowernumber'} = $borrowernumber; |
145 |
$borrower{'borrowernumber'} = $borrowernumber; |
| 146 |
while ( my ( $key, $entry ) = each %{$config->{'mapping'}} ) { |
146 |
while ( my ( $key, $entry ) = each %{$config->{'mapping'}} ) { |
| 147 |
if ( any { /(^psgi\.|^plack\.)/i } keys %ENV ) { |
147 |
if ( C4::Context::psgi_env ) { |
| 148 |
$borrower{$key} = ( $entry->{'is'} && $ENV{"HTTP_" . uc($entry->{'is'}) } ) || $entry->{'content'} || ''; |
148 |
$borrower{$key} = ( $entry->{'is'} && $ENV{"HTTP_" . uc($entry->{'is'}) } ) || $entry->{'content'} || ''; |
| 149 |
} else { |
149 |
} else { |
| 150 |
$borrower{$key} = ( $entry->{'is'} && $ENV{ $entry->{'is'} } ) || $entry->{'content'} || ''; |
150 |
$borrower{$key} = ( $entry->{'is'} && $ENV{ $entry->{'is'} } ) || $entry->{'content'} || ''; |