@@ -, +, @@ actions ) will use the patron home branch as the logged in library from the patron's home library not matter which library is was supposed to be checked out from. the library as defined in the SIP configuration file. --- C4/Auth.pm | 8 ++++---- C4/SIP/ILS/Patron.pm | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) --- a/C4/Auth.pm +++ a/C4/Auth.pm @@ -1734,7 +1734,7 @@ sub get_session { } sub checkpw { - my ( $dbh, $userid, $password, $query, $type ) = @_; + my ( $dbh, $userid, $password, $query, $type, $no_set_userenv ) = @_; $type = 'opac' unless $type; if ($ldap) { $debug and print STDERR "## checkpw - checking LDAP\n"; @@ -1774,7 +1774,7 @@ sub checkpw { } # INTERNAL AUTH - return checkpw_internal(@_) + return checkpw_internal( $dbh, $userid, $password, $no_set_userenv) } sub checkpw_internal { @@ -1808,7 +1808,7 @@ sub checkpw_internal { if ( checkpw_hash( $password, $stored_hash ) ) { C4::Context->set_userenv( "$borrowernumber", $userid, $cardnumber, - $firstname, $surname, $branchcode, $branchname, $flags ); + $firstname, $surname, $branchcode, $branchname, $flags ) unless $no_set_userenv; return 1, $cardnumber, $userid; } } @@ -1825,7 +1825,7 @@ sub checkpw_internal { if ( checkpw_hash( $password, $stored_hash ) ) { C4::Context->set_userenv( $borrowernumber, $userid, $cardnumber, - $firstname, $surname, $branchcode, $branchname, $flags ); + $firstname, $surname, $branchcode, $branchname, $flags ) unless $no_set_userenv; return 1, $cardnumber, $userid; } } --- a/C4/SIP/ILS/Patron.pm +++ a/C4/SIP/ILS/Patron.pm @@ -201,7 +201,7 @@ sub check_password { my $dbh = C4::Context->dbh; my $ret = 0; - ($ret) = checkpw( $dbh, $self->{userid}, $pwd ); + ($ret) = checkpw( $dbh, $self->{userid}, $pwd, my $query, my $type, my $no_set_userenv = 1 ); return $ret; } --