summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-11-16 14:28:55 -0500
committerEvan Prodromou <evan@status.net>2009-11-16 14:28:55 -0500
commitd59af0296070cd868855564a0280e4be2c16410d (patch)
tree664f3f1030c0ac8770bbbca71252acabaa43b3dc /lib
parent05ff8925bf2d115bf2c249d6901f7f67b7ac7ba8 (diff)
disallow email on faves from sandboxed users
Diffstat (limited to 'lib')
-rw-r--r--lib/mail.php4
-rw-r--r--lib/right.php1
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/mail.php b/lib/mail.php
index 6e74d1806..dffac3262 100644
--- a/lib/mail.php
+++ b/lib/mail.php
@@ -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();
diff --git a/lib/right.php b/lib/right.php
index 90ca75fd5..5e66eae0e 100644
--- a/lib/right.php
+++ b/lib/right.php
@@ -56,5 +56,6 @@ class Right
const SUBSCRIBE = 'subscribe';
const EMAILONREPLY = 'emailonreply';
const EMAILONSUBSCRIBE = 'emailonsubscribe';
+ const EMAILONFAVE = 'emailonfave';
}