The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
"Receive Email from Administrators": Which members have set this to "no"?
Is there a way of getting a list of usernames who have set it to "no"?
Similarly I would like to know who has selected "Don't receive Email Notification of new Private Messages" Thanks. --------------- Added [DATE]1357252509[/DATE] at [TIME]1357252509[/TIME] --------------- anyone any thoughts? |
#2
|
|||
|
|||
anyone got any ideas?
|
#3
|
|||
|
|||
You would have to create a custom script or use a query directly thru mysql or phpmyadmin.
|
#4
|
|||
|
|||
Yes I know that. Does anyone know what query I would need to run in phpmyadmin?
|
#5
|
||||
|
||||
I'd check the user table and see what field that is, then something like
select * from user where admin_emails = no |
#6
|
||||
|
||||
You'd need to know which option in the user table is for recieve admin emails and then get the matches like this
PHP Code:
I dont know what the criteria is for creating the options list or how they arrive at the figures, if i did i could help further --------------- Added [DATE]1357315487[/DATE] at [TIME]1357315487[/TIME] --------------- Unfortunately that column doesn't exist |
#7
|
|||
|
|||
It would be:
Code:
SELECT username FROM user WHERE options & 16 = 0 |
2 благодарности(ей) от: | ||
Brandon Sheley, WorldCraft |
#8
|
||||
|
||||
Hi Kevin could you possibly explain the & 16 =0 obviously it works but i don't know why?
|
#9
|
|||
|
|||
It's kind of like what you said, only for your method to work the value would have to be a string, with the number represented in binary. The & operator is kind of like treating an integer field as if it were a binary string, and checking only one character out of it. '&' means 'bitwise and', and 16 is 10000 in binary, so it's checking the 5th bit from the right. When you '&' the values, you'll get either 16 or 0, depending on whether or not that bit is set, so then you just have check for whether or not the result is 0.
I hope that makes some sense. Maybe this is better: http://en.wikipedia.org/wiki/Mask_%28computing%29 |
#10
|
||||
|
||||
It makes perfect sense, i had the right idea but just not the skill to execute it properly! - thanks for the explanation and it's something i'll add to my toolchest for future
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|