Fixed default user settings regarding safety
This commit is contained in:
parent
87eaa9ba9e
commit
328d3f833b
1 changed files with 4 additions and 1 deletions
|
@ -48,7 +48,10 @@ class Model_User extends RedBean_SimpleModel
|
|||
|
||||
public function hasEnabledSafety($safety)
|
||||
{
|
||||
return $this->getSetting(self::SETTING_SAFETY) & PostSafety::toFlag($safety);
|
||||
$all = $this->getSetting(self::SETTING_SAFETY);
|
||||
if (!$all)
|
||||
return true;
|
||||
return $all & PostSafety::toFlag($safety);
|
||||
}
|
||||
|
||||
public function enableSafety($safety, $enabled)
|
||||
|
|
Loading…
Reference in a new issue