Implemented new state check for accounts. If an account state is set to disabled no actions will be allowed

This commit is contained in:
Djamil Legato
2015-11-18 18:31:19 -08:00
parent b1630feb5d
commit 63e083ea37

View File

@@ -40,6 +40,9 @@ class User extends Data
if (!isset($content['username'])) {
$content['username'] = $username;
}
if (!isset($content['state'])) {
$content['state'] = 'enabled';
}
$user = new User($content, $blueprint);
$user->file($file);
@@ -139,6 +142,10 @@ class User extends Data
return false;
}
if ($this->state !== 'enabled') {
return false;
}
return Utils::isPositive($this->get("access.{$action}"));
}