Lines 395-406
sub AuthenticatePatron {
Link Here
|
395 |
my $username = $cgi->param('username'); |
395 |
my $username = $cgi->param('username'); |
396 |
my $password = $cgi->param('password'); |
396 |
my $password = $cgi->param('password'); |
397 |
my ($status, $cardnumber, $userid, $patron) = C4::Auth::checkpw( $username, $password ); |
397 |
my ($status, $cardnumber, $userid, $patron) = C4::Auth::checkpw( $username, $password ); |
398 |
if ( $status == 1 ) { |
398 |
if ( defined $status && $status == 1 ) { |
399 |
# Track the login |
399 |
# Track the login |
400 |
$patron->update_lastseen('connection'); |
400 |
$patron->update_lastseen('connection'); |
401 |
return { id => $patron->borrowernumber }; |
401 |
return { id => $patron->borrowernumber }; |
402 |
} |
402 |
} |
403 |
elsif ( $status == -2 ){ |
403 |
elsif ( defined $status && $status == -2 ) { |
404 |
return { code => 'PasswordExpired' }; |
404 |
return { code => 'PasswordExpired' }; |
405 |
} |
405 |
} |
406 |
else { |
406 |
else { |
407 |
- |
|
|