$profile->free();
unset($profile);
-
+
$sent_to = array();
$conn = jabber_connect();
}
$user->free();
-
+
# Now, get users subscribed to this profile
$user = new User();
'FROM user JOIN subscription ON user.id = subscription.subscriber ' .
'WHERE subscription.subscribed = ' . $notice->profile_id . ' ' .
'AND user.jabber is not null ' .
- 'AND user.jabbernotify = 1 ');
+ 'AND user.jabbernotify = 1 ' .
+ 'AND subscription.jabber = 1 ');
while ($user->fetch()) {
if (!array_key_exists($user->id, $sent_to)) {
}
$user->free();
-
+
return true;
}
'ON user.id = subscription.subscriber ' .
'WHERE subscription.subscribed = ' . $notice->profile_id . ' ' .
'AND user.smsemail IS NOT NULL ' .
- 'AND user.smsnotify = 1');
+ 'AND user.smsnotify = 1 ' .
+ 'AND subscription.sms = 1 ');
while ($user->fetch()) {
common_log(LOG_INFO,
mail_send($recipients, $headers, $body);
}
-
function mail_notify_nudge($from, $to) {
common_init_locale($to->language);
$subject = sprintf(_('You\'ve been nudged by %s'), $from->nickname);
return mail_to_user($to, $subject, $body);
}
-
-
function mail_notify_message($message, $from=NULL, $to=NULL) {
if (is_null($from)) {