diff --git a/C4/Auth_with_shibboleth.pm b/C4/Auth_with_shibboleth.pm index 0ff0d25604..24246d51ec 100644 --- a/C4/Auth_with_shibboleth.pm +++ b/C4/Auth_with_shibboleth.pm @@ -125,7 +125,11 @@ sub _autocreate { my %borrower = ( $config->{matchpoint} => $match ); while ( my ( $key, $entry ) = each %{$config->{'mapping'}} ) { - $borrower{$key} = ( $entry->{'is'} && $ENV{ $entry->{'is'} } ) || $entry->{'content'} || ''; + if ( any { /(^psgi|^plack)/i } keys %ENV ) { + $borrower{$key} = ( $entry->{'is'} && $ENV{"HTTP_" . uc($entry->{'is'}) } ) || $entry->{'content'} || ''; + } else { + $borrower{$key} = ( $entry->{'is'} && $ENV{ $entry->{'is'} } ) || $entry->{'content'} || ''; + } } my $patron = Koha::Patron->new( \%borrower )->store;