Lines 755-761
sub checkauth {
Link Here
|
755 |
$info{'invalidCasLogin'} = 1 unless ($return); |
755 |
$info{'invalidCasLogin'} = 1 unless ($return); |
756 |
} else { |
756 |
} else { |
757 |
my $retuserid; |
757 |
my $retuserid; |
758 |
( $return, $retuserid ) = checkpw( $dbh, $userid, $password, $query ); |
758 |
( $return, $cardnumber, $retuserid ) = checkpw( $dbh, $userid, $password, $query ); |
759 |
$userid = $retuserid if ($retuserid ne ''); |
759 |
$userid = $retuserid if ($retuserid ne ''); |
760 |
} |
760 |
} |
761 |
if ($return) { |
761 |
if ($return) { |
Lines 1431-1438
sub checkpw {
Link Here
|
1431 |
my ( $dbh, $userid, $password, $query ) = @_; |
1431 |
my ( $dbh, $userid, $password, $query ) = @_; |
1432 |
if ($ldap) { |
1432 |
if ($ldap) { |
1433 |
$debug and print "## checkpw - checking LDAP\n"; |
1433 |
$debug and print "## checkpw - checking LDAP\n"; |
1434 |
my ($retval,$retcard) = checkpw_ldap(@_); # EXTERNAL AUTH |
1434 |
my ($retval,$retcard,$retuserid) = checkpw_ldap(@_); # EXTERNAL AUTH |
1435 |
($retval) and return ($retval,$retcard); |
1435 |
($retval) and return ($retval,$retcard,$retuserid); |
1436 |
} |
1436 |
} |
1437 |
|
1437 |
|
1438 |
if ($cas && $query && $query->param('ticket')) { |
1438 |
if ($cas && $query && $query->param('ticket')) { |
Lines 1458-1464
sub checkpw {
Link Here
|
1458 |
|
1458 |
|
1459 |
C4::Context->set_userenv( "$borrowernumber", $userid, $cardnumber, |
1459 |
C4::Context->set_userenv( "$borrowernumber", $userid, $cardnumber, |
1460 |
$firstname, $surname, $branchcode, $flags ); |
1460 |
$firstname, $surname, $branchcode, $flags ); |
1461 |
return 1, $userid; |
1461 |
return 1, $cardnumber, $userid; |
1462 |
} |
1462 |
} |
1463 |
} |
1463 |
} |
1464 |
$sth = |
1464 |
$sth = |
Lines 1474-1480
sub checkpw {
Link Here
|
1474 |
|
1474 |
|
1475 |
C4::Context->set_userenv( $borrowernumber, $userid, $cardnumber, |
1475 |
C4::Context->set_userenv( $borrowernumber, $userid, $cardnumber, |
1476 |
$firstname, $surname, $branchcode, $flags ); |
1476 |
$firstname, $surname, $branchcode, $flags ); |
1477 |
return 1, $userid; |
1477 |
return 1, $cardnumber, $userid; |
1478 |
} |
1478 |
} |
1479 |
} |
1479 |
} |
1480 |
if ( $userid && $userid eq C4::Context->config('user') |
1480 |
if ( $userid && $userid eq C4::Context->config('user') |