mirror of
https://github.com/filegator/filegator.git
synced 2025-08-05 06:27:35 +02:00
database auth adapter - session fix
This commit is contained in:
@@ -60,7 +60,7 @@ class Database implements Service, AuthInterface
|
|||||||
->fetch('SELECT * FROM users WHERE username = ?', $user->getUsername())
|
->fetch('SELECT * FROM users WHERE username = ?', $user->getUsername())
|
||||||
;
|
;
|
||||||
|
|
||||||
if ($ret && $hash == $ret->password) {
|
if ($ret && $hash == $ret->password.$ret->permissions.$ret->homedir.$ret->role) {
|
||||||
return $user;
|
return $user;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ class Database implements Service, AuthInterface
|
|||||||
if ($ret && $this->verifyPassword($password, $ret->password)) {
|
if ($ret && $this->verifyPassword($password, $ret->password)) {
|
||||||
$user = $this->mapToUserObject($ret);
|
$user = $this->mapToUserObject($ret);
|
||||||
$this->store($user);
|
$this->store($user);
|
||||||
$this->session->set(self::SESSION_HASH, $ret->password);
|
$this->session->set(self::SESSION_HASH, $ret->password.$ret->permissions.$ret->homedir.$ret->role);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user