Lines 1952-1960
sub checkpw {
Link Here
|
1952 |
if ( $patron and ( $patron->account_locked ) ) { |
1952 |
if ( $patron and ( $patron->account_locked ) ) { |
1953 |
# Nothing to check, account is locked |
1953 |
# Nothing to check, account is locked |
1954 |
} elsif ($ldap && defined($password)) { |
1954 |
} elsif ($ldap && defined($password)) { |
1955 |
my ( $retval, $retcard, $retuserid ) = checkpw_ldap(@_); # EXTERNAL AUTH |
1955 |
my ( $retval, $retcard, $retuserid ); |
|
|
1956 |
( $retval, $retcard, $retuserid, $patron ) = checkpw_ldap(@_); # EXTERNAL AUTH |
1956 |
if ( $retval == 1 ) { |
1957 |
if ( $retval == 1 ) { |
1957 |
@return = ( $retval, $retcard, $retuserid ); |
1958 |
@return = ( $retval, $retcard, $retuserid, $patron ); |
1958 |
$passwd_ok = 1; |
1959 |
$passwd_ok = 1; |
1959 |
} |
1960 |
} |
1960 |
$check_internal_as_fallback = 1 if $retval == 0; |
1961 |
$check_internal_as_fallback = 1 if $retval == 0; |
Lines 1964-1972
sub checkpw {
Link Here
|
1964 |
# In case of a CAS authentication, we use the ticket instead of the password |
1965 |
# In case of a CAS authentication, we use the ticket instead of the password |
1965 |
my $ticket = $query->param('ticket'); |
1966 |
my $ticket = $query->param('ticket'); |
1966 |
$query->delete('ticket'); # remove ticket to come back to original URL |
1967 |
$query->delete('ticket'); # remove ticket to come back to original URL |
1967 |
my ( $retval, $retcard, $retuserid, $cas_ticket ) = checkpw_cas( $ticket, $query, $type ); # EXTERNAL AUTH |
1968 |
my ( $retval, $retcard, $retuserid, $cas_ticket, $patron ) = checkpw_cas( $ticket, $query, $type ); # EXTERNAL AUTH |
1968 |
if ( $retval ) { |
1969 |
if ( $retval ) { |
1969 |
@return = ( $retval, $retcard, $retuserid, $cas_ticket ); |
1970 |
@return = ( $retval, $retcard, $retuserid, $patron, $cas_ticket ); |
1970 |
} else { |
1971 |
} else { |
1971 |
@return = (0); |
1972 |
@return = (0); |
1972 |
} |
1973 |
} |
Lines 1984-1992
sub checkpw {
Link Here
|
1984 |
|
1985 |
|
1985 |
# Then, we check if it matches a valid koha user |
1986 |
# Then, we check if it matches a valid koha user |
1986 |
if ($shib_login) { |
1987 |
if ($shib_login) { |
1987 |
my ( $retval, $retcard, $retuserid ) = C4::Auth_with_shibboleth::checkpw_shib($shib_login); # EXTERNAL AUTH |
1988 |
my ( $retval, $retcard, $retuserid, $patron ) = C4::Auth_with_shibboleth::checkpw_shib($shib_login); # EXTERNAL AUTH |
1988 |
if ( $retval ) { |
1989 |
if ( $retval ) { |
1989 |
@return = ( $retval, $retcard, $retuserid ); |
1990 |
@return = ( $retval, $retcard, $retuserid, $patron ); |
1990 |
} |
1991 |
} |
1991 |
$passwd_ok = $retval; |
1992 |
$passwd_ok = $retval; |
1992 |
} |
1993 |
} |
Lines 1997-2002
sub checkpw {
Link Here
|
1997 |
# INTERNAL AUTH |
1998 |
# INTERNAL AUTH |
1998 |
if ( $check_internal_as_fallback ) { |
1999 |
if ( $check_internal_as_fallback ) { |
1999 |
@return = checkpw_internal( $userid, $password, $no_set_userenv); |
2000 |
@return = checkpw_internal( $userid, $password, $no_set_userenv); |
|
|
2001 |
push(@return, $patron); |
2000 |
$passwd_ok = 1 if $return[0] > 0; # 1 or 2 |
2002 |
$passwd_ok = 1 if $return[0] > 0; # 1 or 2 |
2001 |
} |
2003 |
} |
2002 |
|
2004 |
|