Fixed default user settings regarding safety

This commit is contained in:
Marcin Kurczewski 2013-10-22 21:56:19 +02:00
parent 87eaa9ba9e
commit 328d3f833b

View file

@ -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)