Use new function to get user record.

This commit is contained in:
Maxime Delorme 2007-05-30 23:25:30 +12:00 committed by Andrew McMillan
parent 6fd430cbe3
commit 242d95fc08

View File

@ -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;