The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
The title says it all really.
On a site running 3.8.2 how do we stop banned users from getting new post/thread notifications? I would like to do this automatically on banning. I'm sure this issue has cropped up before but tried a search and couldn't find anything recent. |
|
#2
|
|||
|
|||
|
In file includes/functions_newpost.php around line 1387 or so is this:
Code:
//If the target user's location is the same as the current user, then don't send them
//a notification.
$useremails = $vbulletin->db->query_read_slave("
SELECT user.*, subscribethread.emailupdate, subscribethread.subscribethreadid
FROM " . TABLE_PREFIX . "subscribethread AS subscribethread
INNER JOIN " . TABLE_PREFIX . "user AS user ON (subscribethread.userid = user.userid)
LEFT JOIN " . TABLE_PREFIX . "usergroup AS usergroup ON (usergroup.usergroupid = user.usergroupid)
LEFT JOIN " . TABLE_PREFIX . "usertextfield AS usertextfield ON (usertextfield.userid = user.userid)
WHERE subscribethread.threadid = $threadid AND
subscribethread.emailupdate IN (1, 4) AND
subscribethread.canview = 1 AND
" . ($userid ? "CONCAT(' ', IF(usertextfield.ignorelist IS NULL, '', usertextfield.ignorelist), ' ') NOT LIKE '% " . intval($userid) . " %' AND" : '') . "
user.usergroupid <> 3 AND
user.usergroupid <> 8 AND
user.userid <> " . intval($userid) . " AND
user.lastactivity >= " . intval($lastposttime['dateline']) . " AND
(usergroup.genericoptions & " . $vbulletin->bf_ugp_genericoptions['isnotbannedgroup'] . ")
");
I think if you add the line in red it will eliminate banned users from notification emails. |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|