Revert "Add special handling for User authenticated and authorized properties"

This reverts commit 8e0e3e8718.
This commit is contained in:
Andy Miller
2018-05-14 18:25:36 -06:00
parent dab595f571
commit 11266ce8f8

View File

@@ -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.
*