From 242d95fc08c61f1098b25492acdd05cd171b8bce Mon Sep 17 00:00:00 2001 From: Maxime Delorme Date: Wed, 30 May 2007 23:25:30 +1200 Subject: [PATCH] Use new function to get user record. --- inc/BasicAuthSession.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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;