diff --git a/inc/BasicAuthSession.php b/inc/BasicAuthSession.php index a498c0a9..d6a5f421 100644 --- a/inc/BasicAuthSession.php +++ b/inc/BasicAuthSession.php @@ -90,9 +90,7 @@ class BasicAuthSession { return call_user_func( $c->authenticate_hook['call'], $username, $password ); } - $qry = new PgQuery( "SELECT * FROM usr WHERE lower(username) = lower(?) ", $username ); - if ( $qry->Exec('BasicAuth',__LINE__,__FILE__) && $qry->rows == 1 ) { - $usr = $qry->Fetch(); + if ( $usr = getUserByName($username) ) { dbg_error_log( "BasicAuth", ":CheckPassword: Name:%s, Pass:%s, File:%s", $username, $password, $usr->password ); if ( session_validate_password( $password, $usr->password ) ) { return $usr;