Lines 1417-1422
sub checkauth {
Link Here
|
1417 |
my $auth_error = $query->param('auth_error'); |
1417 |
my $auth_error = $query->param('auth_error'); |
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 |
|
1421 |
my $borrowernumber = $patron and $patron->borrowernumber; |
1422 |
my $anonymous_patron = C4::Context->preference('AnonymousPatron'); |
1423 |
my $is_anonymous_patron = $patron && ( $patron->borrowernumber eq $anonymous_patron ); |
1424 |
|
1420 |
$template->param( |
1425 |
$template->param( |
1421 |
login => 1, |
1426 |
login => 1, |
1422 |
INPUTS => \@inputs, |
1427 |
INPUTS => \@inputs, |
Lines 1451-1456
sub checkauth {
Link Here
|
1451 |
opac_css_override => $ENV{'OPAC_CSS_OVERRIDE'}, |
1456 |
opac_css_override => $ENV{'OPAC_CSS_OVERRIDE'}, |
1452 |
too_many_login_attempts => ( $patron and $patron->account_locked ), |
1457 |
too_many_login_attempts => ( $patron and $patron->account_locked ), |
1453 |
password_has_expired => ( $patron and $patron->password_expired ), |
1458 |
password_has_expired => ( $patron and $patron->password_expired ), |
|
|
1459 |
is_anonymous_patron => ( $is_anonymous_patron ), |
1454 |
auth_error => $auth_error, |
1460 |
auth_error => $auth_error, |
1455 |
); |
1461 |
); |
1456 |
|
1462 |
|
Lines 1977-1982
sub checkpw {
Link Here
|
1977 |
my $shib = C4::Context->config('useshibboleth') && shib_ok(); |
1983 |
my $shib = C4::Context->config('useshibboleth') && shib_ok(); |
1978 |
my $shib_login = $shib ? get_login_shib() : undef; |
1984 |
my $shib_login = $shib ? get_login_shib() : undef; |
1979 |
|
1985 |
|
|
|
1986 |
my $anonymous_patron = C4::Context->preference('AnonymousPatron'); |
1987 |
|
1980 |
my @return; |
1988 |
my @return; |
1981 |
my $patron; |
1989 |
my $patron; |
1982 |
if ( defined $userid ) { |
1990 |
if ( defined $userid ) { |
Lines 2053-2058
sub checkpw {
Link Here
|
2053 |
if ( $patron->password_expired ) { |
2061 |
if ( $patron->password_expired ) { |
2054 |
@return = ( -2, $patron ); |
2062 |
@return = ( -2, $patron ); |
2055 |
} |
2063 |
} |
|
|
2064 |
if ( $patron->borrowernumber eq $anonymous_patron ) { |
2065 |
@return = ( -2, $patron ); |
2066 |
} |
2056 |
} elsif ( !$patron->account_locked ) { |
2067 |
} elsif ( !$patron->account_locked ) { |
2057 |
$patron->update( { login_attempts => $patron->login_attempts + 1 } ); |
2068 |
$patron->update( { login_attempts => $patron->login_attempts + 1 } ); |
2058 |
} |
2069 |
} |