disallow email on faves from sandboxed users
This commit is contained in:
parent
05ff8925bf
commit
d59af02960
|
@ -697,6 +697,7 @@ class Profile extends Memcached_DataObject
|
|||
case Right::PUBLICNOTICE:
|
||||
case Right::EMAILONREPLY:
|
||||
case Right::EMAILONSUBSCRIBE:
|
||||
case Right::EMAILONFAVE:
|
||||
$result = !$this->isSandboxed();
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -546,6 +546,10 @@ function mail_notify_message($message, $from=null, $to=null)
|
|||
|
||||
function mail_notify_fave($other, $user, $notice)
|
||||
{
|
||||
if (!$user->hasRight(Right::EMAILONFAVE)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$profile = $user->getProfile();
|
||||
|
||||
$bestname = $profile->getBestName();
|
||||
|
|
|
@ -56,5 +56,6 @@ class Right
|
|||
const SUBSCRIBE = 'subscribe';
|
||||
const EMAILONREPLY = 'emailonreply';
|
||||
const EMAILONSUBSCRIBE = 'emailonsubscribe';
|
||||
const EMAILONFAVE = 'emailonfave';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user