Merge pull request #3626 from annando/issue-3616
Issue 3616: Don't create notifications for forum accounts
This commit is contained in:
commit
0babc2c96e
1 changed files with 8 additions and 3 deletions
|
@ -45,9 +45,14 @@ function notification($params) {
|
||||||
if (empty($sender_email))
|
if (empty($sender_email))
|
||||||
$sender_email = t('noreply').'@'.$hostname;
|
$sender_email = t('noreply').'@'.$hostname;
|
||||||
|
|
||||||
$user = q("SELECT `nickname` FROM `user` WHERE `uid` = %d", intval($params['uid']));
|
$user = dba::select('user', array('nickname', 'page-flags'),
|
||||||
if ($user)
|
array('uid' => $params['uid']), array('limit' => 1));
|
||||||
$nickname = $user[0]["nickname"];
|
|
||||||
|
// There is no need to create notifications for forum accounts
|
||||||
|
if (!dbm::is_result($user) || in_array($user["page-flags"], array(PAGE_COMMUNITY, PAGE_PRVGROUP))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$nickname = $user["nickname"];
|
||||||
|
|
||||||
// with $params['show_in_notification_page'] == false, the notification isn't inserted into
|
// with $params['show_in_notification_page'] == false, the notification isn't inserted into
|
||||||
// the database, and an email is sent if applicable.
|
// the database, and an email is sent if applicable.
|
||||||
|
|
Loading…
Reference in a new issue