Bug 5995 Followup: checkpw was returning inconsistent values
In the case of LDAP, checkpw was returning the cardnumber of there user, but it was being treated as the
userid. This patch updates checkpw_ldap to return the cardnumber AND the userid, and updates checkpw to
uniformly return cardnumber and userid in all instances, so that whoever is authenticating can use the
desired value in the right way.
(cherry picked from commit dcb4ac77fb)
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
This commit is contained in:
parent
07ce7d8d3b
commit
bb3fae1495
|
|
@ -750,7 +750,7 @@ sub checkauth {
|
|||
$info{'invalidCasLogin'} = 1 unless ($return);
|
||||
} else {
|
||||
my $retuserid;
|
||||
( $return, $retuserid ) = checkpw( $dbh, $userid, $password, $query );
|
||||
( $return, $cardnumber, $retuserid ) = checkpw( $dbh, $userid, $password, $query );
|
||||
$userid = $retuserid if ($retuserid ne '');
|
||||
}
|
||||
if ($return) {
|
||||
|
|
@ -1452,7 +1452,7 @@ sub checkpw {
|
|||
|
||||
C4::Context->set_userenv( "$borrowernumber", $userid, $cardnumber,
|
||||
$firstname, $surname, $branchcode, $flags );
|
||||
return 1, $userid;
|
||||
return 1, $cardnumber, $userid;
|
||||
}
|
||||
}
|
||||
$sth =
|
||||
|
|
|
|||
Loading…
Reference in New Issue