|
@@ -138,13 +138,13 @@ class Users extends Manager
|
|
*/
|
|
*/
|
|
public function guest(array $attrs = []): User
|
|
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)) {
|
|
if (! \is_array($cache)) {
|
|
$cache = $this->c->groups->get(FORK_GROUP_GUEST)->getAttrs();
|
|
$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
|
|
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;
|
|
return $this;
|