Fix Users manager
This commit is contained in:
parent
1d8ecda60b
commit
62e963b97c
1 changed files with 5 additions and 5 deletions
|
@ -138,13 +138,13 @@ class Users extends Manager
|
|||
*/
|
||||
public function guest(array $attrs = []): User
|
||||
{
|
||||
$cache = $this->c->Cache->get(CACHE_NAME);
|
||||
$cache = $this->c->Cache->get(self::CACHE_NAME);
|
||||
|
||||
if (! \is_array($cache)) {
|
||||
$cache = $this->c->groups->get(FORK_GROUP_GUEST)->getAttrs();
|
||||
|
||||
if (true !== $this->c->Cache->set(CACHE_NAME, $cache)) {
|
||||
throw new RuntimeException('Unable to write value to cache - ' . CACHE_NAME);
|
||||
if (true !== $this->c->Cache->set(self::CACHE_NAME, $cache)) {
|
||||
throw new RuntimeException('Unable to write value to cache - ' . self::CACHE_NAME);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -163,8 +163,8 @@ class Users extends Manager
|
|||
*/
|
||||
public function resetGuest(): Users
|
||||
{
|
||||
if (true !== $this->c->Cache->delete(CACHE_NAME)) {
|
||||
throw new RuntimeException('Unable to remove key from cache - ' . CACHE_NAME);
|
||||
if (true !== $this->c->Cache->delete(self::CACHE_NAME)) {
|
||||
throw new RuntimeException('Unable to remove key from cache - ' . self::CACHE_NAME);
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
|
Loading…
Add table
Reference in a new issue