Removed User model from $_SESSION.
This commit is contained in:
parent
597a20deea
commit
f26726c6e9
16 changed files with 72 additions and 74 deletions
|
|
@ -32,11 +32,8 @@ class Application extends b8\Application
|
|||
$user = b8\Store\Factory::getStore('User')->getByPrimaryKey($_SESSION['php-censor-user-id']);
|
||||
|
||||
if ($user) {
|
||||
$_SESSION['php-censor-user'] = $user;
|
||||
return true;
|
||||
}
|
||||
|
||||
unset($_SESSION['php-censor-user-id']);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
@ -158,11 +155,9 @@ class Application extends b8\Application
|
|||
$defaultUserId = (integer)$config->get('php-censor.security.default_user_id', 1);
|
||||
|
||||
if ($disableAuth && $defaultUserId) {
|
||||
$user = b8\Store\Factory::getStore('User')
|
||||
->getByPrimaryKey($defaultUserId);
|
||||
$user = b8\Store\Factory::getStore('User')->getByPrimaryKey($defaultUserId);
|
||||
|
||||
if ($user) {
|
||||
$_SESSION['php-censor-user'] = $user;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue