Lines 1149-1155
sub checkauth {
Link Here
|
1149 |
} |
1149 |
} |
1150 |
|
1150 |
|
1151 |
# $return: 1 = valid user |
1151 |
# $return: 1 = valid user |
1152 |
if ($return) { |
1152 |
if ($return > 0) { |
1153 |
|
1153 |
|
1154 |
if ( $flags = haspermission( $userid, $flagsrequired ) ) { |
1154 |
if ( $flags = haspermission( $userid, $flagsrequired ) ) { |
1155 |
$auth_state = "logged_in"; |
1155 |
$auth_state = "logged_in"; |
Lines 1909-1916
sub checkpw {
Link Here
|
1909 |
# 0 if auth is nok |
1909 |
# 0 if auth is nok |
1910 |
# -1 if user bind failed (LDAP only) |
1910 |
# -1 if user bind failed (LDAP only) |
1911 |
|
1911 |
|
1912 |
if ( $patron and ( $patron->account_locked || $patron->password_expired ) ) { |
1912 |
if ( $patron and ( $patron->account_locked ) ) { |
1913 |
# Nothing to check, account is locked or password expired |
1913 |
# Nothing to check, account is locked |
1914 |
} elsif ($ldap && defined($password)) { |
1914 |
} elsif ($ldap && defined($password)) { |
1915 |
my ( $retval, $retcard, $retuserid ) = checkpw_ldap(@_); # EXTERNAL AUTH |
1915 |
my ( $retval, $retcard, $retuserid ) = checkpw_ldap(@_); # EXTERNAL AUTH |
1916 |
if ( $retval == 1 ) { |
1916 |
if ( $retval == 1 ) { |
Lines 1963-1968
sub checkpw {
Link Here
|
1963 |
if( $patron ) { |
1963 |
if( $patron ) { |
1964 |
if ( $passwd_ok ) { |
1964 |
if ( $passwd_ok ) { |
1965 |
$patron->update({ login_attempts => 0 }); |
1965 |
$patron->update({ login_attempts => 0 }); |
|
|
1966 |
if( $patron->password_expired ){ |
1967 |
@return = (-2); |
1968 |
} |
1966 |
} elsif( !$patron->account_locked ) { |
1969 |
} elsif( !$patron->account_locked ) { |
1967 |
$patron->update({ login_attempts => $patron->login_attempts + 1 }); |
1970 |
$patron->update({ login_attempts => $patron->login_attempts + 1 }); |
1968 |
} |
1971 |
} |