double-check profile

This commit is contained in:
Evan Prodromou 2012-03-21 13:05:02 -04:00
parent ad1649e4ba
commit 8706d8d351

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;
}
}