mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-11-29 08:56:03 +00:00
Use new function to get user record.
This commit is contained in:
1 parent
6fd430cbe3
commit
242d95fc08
1 file changed
+1
-3
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user