From 11266ce8f8a206f2d9dde410da40b3cbdd4b49fd Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Mon, 14 May 2018 18:25:36 -0600 Subject: [PATCH] Revert "Add special handling for User authenticated and authorized properties" This reverts commit 8e0e3e871849a14cbaef6254fed34e49534e9625. --- system/src/Grav/Common/User/User.php | 52 ---------------------------- 1 file changed, 52 deletions(-) diff --git a/system/src/Grav/Common/User/User.php b/system/src/Grav/Common/User/User.php index 8baec6333..c1e628d50 100644 --- a/system/src/Grav/Common/User/User.php +++ b/system/src/Grav/Common/User/User.php @@ -17,9 +17,6 @@ use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator; class User extends Data { - protected $authenticated; - protected $authorized; - /** * Load user account. * @@ -105,55 +102,6 @@ class User extends Data return false; } - - public function offsetExists($offset) - { - if ($offset === 'authenticated') { - return null !== $this->authenticated; - } - if ($offset === 'authorized') { - return null !== $this->authorized; - } - - return parent::offsetExists($offset); - } - - public function offsetGet($offset) - { - if ($offset === 'authenticated') { - return null !== $this->authenticated ? $this->authenticated : false; - } - if ($offset === 'authorized') { - return null !== $this->authorized ? $this->authorized : $this->authenticated; - } - - return parent::offsetGet($offset); - } - - public function offsetSet($offset, $value) - { - if ($offset === 'authenticated') { - $this->authenticated = (bool)$value; - } - if ($offset === 'authorized') { - $this->authorized = (bool)$value; - } - - parent::offsetSet($offset, $value); - } - - public function offsetUnset($offset) - { - if ($offset === 'authenticated') { - $this->authenticated = null; - } - if ($offset === 'authorized') { - $this->authorized = null; - } - - parent::offsetUnset($offset); - } - /** * Authenticate user. *