| 
      
            Lines 1959-1967
          sub checkpw {
      
      
        Link Here
      
     | 
  
        
          | 1959 | 
              if ( $patron and ( $patron->account_locked )  ) { | 
          1959 | 
              if ( $patron and ( $patron->account_locked )  ) { | 
        
        
          | 1960 | 
                  # Nothing to check, account is locked  | 
          1960 | 
                  # Nothing to check, account is locked  | 
        
        
          | 1961 | 
              } elsif ($ldap && defined($password)) { | 
          1961 | 
              } elsif ($ldap && defined($password)) { | 
        
          
            
              | 1962 | 
                      my ( $retval, $retcard, $retuserid ) = checkpw_ldap(@_);    # EXTERNAL AUTH  | 
              1962 | 
                      my ( $retval, $retcard, $retuserid );  | 
            
            
               | 
               | 
              1963 | 
                      ( $retval, $retcard, $retuserid, $patron ) = checkpw_ldap(@_);    # EXTERNAL AUTH  | 
            
        
          | 1963 | 
                  if ( $retval == 1 ) { | 
          1964 | 
                  if ( $retval == 1 ) { | 
        
          
            
              | 1964 | 
                          @return = ( $retval, $retcard, $retuserid );  | 
              1965 | 
                          @return = ( $retval, $retcard, $retuserid, $patron );  | 
            
        
          | 1965 | 
                      $passwd_ok = 1;  | 
          1966 | 
                      $passwd_ok = 1;  | 
        
        
          | 1966 | 
                  }  | 
          1967 | 
                  }  | 
        
        
          | 1967 | 
                  $check_internal_as_fallback = 1 if $retval == 0;  | 
          1968 | 
                  $check_internal_as_fallback = 1 if $retval == 0;  | 
        
  
    | 
      
            Lines 1971-1979
          sub checkpw {
      
      
        Link Here
      
     | 
  
        
          | 1971 | 
                  # In case of a CAS authentication, we use the ticket instead of the password  | 
          1972 | 
                  # In case of a CAS authentication, we use the ticket instead of the password  | 
        
        
          | 1972 | 
                  my $ticket = $query->param('ticket'); | 
          1973 | 
                  my $ticket = $query->param('ticket'); | 
        
        
          | 1973 | 
                  $query->delete('ticket');                                   # remove ticket to come back to original URL | 
          1974 | 
                  $query->delete('ticket');                                   # remove ticket to come back to original URL | 
        
          
            
              | 1974 | 
                      my ( $retval, $retcard, $retuserid, $cas_ticket ) = checkpw_cas( $ticket, $query, $type );    # EXTERNAL AUTH  | 
              1975 | 
                      my ( $retval, $retcard, $retuserid, $cas_ticket, $patron ) = checkpw_cas( $ticket, $query, $type );    # EXTERNAL AUTH  | 
            
        
          | 1975 | 
                  if ( $retval ) { | 
          1976 | 
                  if ( $retval ) { | 
        
          
            
              | 1976 | 
                          @return = ( $retval, $retcard, $retuserid, $cas_ticket );  | 
              1977 | 
                          @return = ( $retval, $retcard, $retuserid, $patron, $cas_ticket );  | 
            
        
          | 1977 | 
                  } else { | 
          1978 | 
                  } else { | 
        
        
          | 1978 | 
                      @return = (0);  | 
          1979 | 
                      @return = (0);  | 
        
        
          | 1979 | 
                  }  | 
          1980 | 
                  }  | 
        
  
    | 
      
            Lines 1991-1999
          sub checkpw {
      
      
        Link Here
      
     | 
  
        
          | 1991 | 
           | 
          1992 | 
           | 
        
        
          | 1992 | 
                  # Then, we check if it matches a valid koha user  | 
          1993 | 
                  # Then, we check if it matches a valid koha user  | 
        
        
          | 1993 | 
                  if ($shib_login) { | 
          1994 | 
                  if ($shib_login) { | 
        
          
            
              | 1994 | 
                          my ( $retval, $retcard, $retuserid ) = C4::Auth_with_shibboleth::checkpw_shib($shib_login);    # EXTERNAL AUTH  | 
              1995 | 
                          my ( $retval, $retcard, $retuserid, $patron ) = C4::Auth_with_shibboleth::checkpw_shib($shib_login);    # EXTERNAL AUTH  | 
            
        
          | 1995 | 
                      if ( $retval ) { | 
          1996 | 
                      if ( $retval ) { | 
        
          
            
              | 1996 | 
                              @return = ( $retval, $retcard, $retuserid );  | 
              1997 | 
                              @return = ( $retval, $retcard, $retuserid, $patron );  | 
            
        
          | 1997 | 
                      }  | 
          1998 | 
                      }  | 
        
        
          | 1998 | 
                      $passwd_ok = $retval;  | 
          1999 | 
                      $passwd_ok = $retval;  | 
        
        
          | 1999 | 
                  }  | 
          2000 | 
                  }  | 
        
  
    | 
      
            Lines 2004-2009
          sub checkpw {
      
      
        Link Here
      
     | 
  
        
          | 2004 | 
              # INTERNAL AUTH  | 
          2005 | 
              # INTERNAL AUTH  | 
        
        
          | 2005 | 
              if ( $check_internal_as_fallback ) { | 
          2006 | 
              if ( $check_internal_as_fallback ) { | 
        
        
          | 2006 | 
                  @return = checkpw_internal( $userid, $password, $no_set_userenv);  | 
          2007 | 
                  @return = checkpw_internal( $userid, $password, $no_set_userenv);  | 
        
            
               | 
               | 
              2008 | 
                      push(@return, $patron);  | 
            
        
          | 2007 | 
                  $passwd_ok = 1 if $return[0] > 0; # 1 or 2  | 
          2009 | 
                  $passwd_ok = 1 if $return[0] > 0; # 1 or 2  | 
        
        
          | 2008 | 
              }  | 
          2010 | 
              }  | 
        
        
          | 2009 | 
           | 
          2011 | 
           |