|
Lines 1418-1425
sub checkauth {
Link Here
|
| 1418 |
my $auth_template_name = ( $type eq 'opac' ) ? 'opac-auth.tt' : 'auth.tt'; |
1418 |
my $auth_template_name = ( $type eq 'opac' ) ? 'opac-auth.tt' : 'auth.tt'; |
| 1419 |
my $template = C4::Templates::gettemplate( $auth_template_name, $type, $query ); |
1419 |
my $template = C4::Templates::gettemplate( $auth_template_name, $type, $query ); |
| 1420 |
|
1420 |
|
| 1421 |
my $borrowernumber = $patron and $patron->borrowernumber; |
1421 |
my $borrowernumber = $patron and $patron->borrowernumber; |
| 1422 |
my $anonymous_patron = C4::Context->preference('AnonymousPatron'); |
1422 |
my $anonymous_patron = C4::Context->preference('AnonymousPatron'); |
| 1423 |
my $is_anonymous_patron = $patron && ( $patron->borrowernumber eq $anonymous_patron ); |
1423 |
my $is_anonymous_patron = $patron && ( $patron->borrowernumber eq $anonymous_patron ); |
| 1424 |
|
1424 |
|
| 1425 |
$template->param( |
1425 |
$template->param( |
|
Lines 2062-2071
sub checkpw {
Link Here
|
| 2062 |
@return = (); |
2062 |
@return = (); |
| 2063 |
} elsif ($passwd_ok) { |
2063 |
} elsif ($passwd_ok) { |
| 2064 |
$patron->update( { login_attempts => 0 } ); |
2064 |
$patron->update( { login_attempts => 0 } ); |
| 2065 |
if ( $patron->password_expired ) { |
|
|
| 2066 |
@return = ( -2, $patron ); |
| 2067 |
} |
| 2068 |
if ( $patron->borrowernumber eq $anonymous_patron ) { |
2065 |
if ( $patron->borrowernumber eq $anonymous_patron ) { |
|
|
2066 |
@return = ( -3, $patron ); |
| 2067 |
} elsif ( $patron->password_expired ) { |
| 2069 |
@return = ( -2, $patron ); |
2068 |
@return = ( -2, $patron ); |
| 2070 |
} |
2069 |
} |
| 2071 |
} else { |
2070 |
} else { |
| 2072 |
- |
|
|