View | Details | Raw Unified | Return to bug 36928
Collapse All | Expand All

(-)a/C4/Auth.pm (-5 / +7 lines)
Lines 1997-2005 sub checkpw { Link Here
1997
1997
1998
        # Nothing to check, account is locked
1998
        # Nothing to check, account is locked
1999
    } elsif ( $ldap && defined($password) ) {
1999
    } elsif ( $ldap && defined($password) ) {
2000
        my ( $retval, $retcard, $retuserid );
2000
        my ( $retval, $retcard, $retuserid, $ldap_patron );
2001
        ( $retval, $retcard, $retuserid, $patron ) = checkpw_ldap(@_);    # EXTERNAL AUTH
2001
        ( $retval, $retcard, $retuserid, $ldap_patron ) = checkpw_ldap(@_);    # EXTERNAL AUTH
2002
        if ( $retval == 1 ) {
2002
        if ( $retval == 1 ) {
2003
            $patron = $ldap_patron if $ldap_patron;
2003
            @return    = ( $retval, $retcard, $retuserid, $patron );
2004
            @return    = ( $retval, $retcard, $retuserid, $patron );
2004
            $passwd_ok = 1;
2005
            $passwd_ok = 1;
2005
        }
2006
        }
Lines 2010-2018 sub checkpw { Link Here
2010
        # In case of a CAS authentication, we use the ticket instead of the password
2011
        # In case of a CAS authentication, we use the ticket instead of the password
2011
        my $ticket = $query->param('ticket');
2012
        my $ticket = $query->param('ticket');
2012
        $query->delete('ticket');                                         # remove ticket to come back to original URL
2013
        $query->delete('ticket');                                         # remove ticket to come back to original URL
2013
        my ( $retval, $retcard, $retuserid, $cas_ticket, $patron ) =
2014
        my ( $retval, $retcard, $retuserid, $cas_ticket, $cas_patron ) =
2014
            checkpw_cas( $ticket, $query, $type );                        # EXTERNAL AUTH
2015
            checkpw_cas( $ticket, $query, $type );                        # EXTERNAL AUTH
2015
        if ($retval) {
2016
        if ($retval) {
2017
            $patron = $cas_patron if $cas_patron;
2016
            @return = ( $retval, $retcard, $retuserid, $patron, $cas_ticket );
2018
            @return = ( $retval, $retcard, $retuserid, $patron, $cas_ticket );
2017
        } else {
2019
        } else {
2018
            @return = (0);
2020
            @return = (0);
Lines 2031-2039 sub checkpw { Link Here
2031
2033
2032
        # Then, we check if it matches a valid koha user
2034
        # Then, we check if it matches a valid koha user
2033
        if ($shib_login) {
2035
        if ($shib_login) {
2034
            my ( $retval, $retcard, $retuserid, $patron ) =
2036
            my ( $retval, $retcard, $retuserid, $shib_patron ) =
2035
                C4::Auth_with_shibboleth::checkpw_shib($shib_login);    # EXTERNAL AUTH
2037
                C4::Auth_with_shibboleth::checkpw_shib($shib_login);    # EXTERNAL AUTH
2036
            if ($retval) {
2038
            if ($retval) {
2039
                $patron = $shib_patron if $shib_patron;
2037
                @return = ( $retval, $retcard, $retuserid, $patron );
2040
                @return = ( $retval, $retcard, $retuserid, $patron );
2038
            }
2041
            }
2039
            $passwd_ok = $retval;
2042
            $passwd_ok = $retval;
2040
- 

Return to bug 36928