The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
SQL Query to turn off admin email for specific usergroup
Hello,
As I can't seem to find a vb 4.x mod that allows turning off Admin Emails for a specific usergroup, I would like to ask if anyone knows what SQL query I could use for that. I know there is an automatic pre-made query "No - Receive Admin Emails", but that turns it off for all users. I would like to only turn it off for a specific group. Thank you in advance for any help -Frederik |
#2
|
||||
|
||||
Run this query.
Code:
UPDATE user SET options = options - 16 WHERE options & 16 AND usergroupid = X |
#3
|
|||
|
|||
Thank you very much!!
|
#4
|
||||
|
||||
Not a problem, glad to help.
|
#5
|
|||
|
|||
I hope you don't mind me asking another question. What variable would I use to delete subscriptions for all members of a usergroup? The reason I'm asking these questions, is that I have many old inactive members, and the forum keeps sending them birthday greetings and emails with updates of threads they have subscribed to, but many of these emails bounce back (and I fear they are flagged as spam). So, I have installed This mod, which enables me to put them all in one group, so I can delete all their subscriptions and turn off admin emails (if people hasn't visited for more than 2 years, I see no reason to keep sending them updates and birthday greetings). |
#6
|
||||
|
||||
This should do the trick.
Code:
DELETE `subscribethread` FROM `subscribethread` LEFT JOIN `user` ON `subscribethread`.`userid` = `user`.`userid` WHERE `subscribethread`.`emailupdate` <> '0' AND `user`.`usergroupid` = 'X' That query will delete all the threads users in the usergroup X are subscribed to. |
Благодарность от: | ||
tbworld |
#7
|
|||
|
|||
Awesome, thank you! I just tested it on a test user/usergroup and it worked like a charm!
Thanks again! |
#8
|
||||
|
||||
Not a problem, glad it worked how you wanted.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|