double-check profile

This commit is contained in:
Evan Prodromou 2012-03-21 13:05:02 -04:00
parent b95de95463
commit b1555fe373

View File

@ -2474,7 +2474,7 @@ class Notice extends Managed_DataObject
$author = $this->getProfile();
if ($author->hasRole(Profile_role::SILENCED)) {
if (!$profile->hasRole(Profile_role::MODERATOR)) {
if (empty($profile) || !$profile->hasRole(Profile_role::MODERATOR)) {
return true;
}
}