The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How do I Check Mod Permission via Plugin
I want to use something similar with "can_moderate" that is available in templates conditionals.
How do I perform such operation inside a plugin? Say that I have an array of forum IDs and a Userid. I want to iterate all the way through my array of Forum IDs to check if the User has any moderation power in any of those forum IDs. What function should I use? thanks |
Благодарность от: | ||
Popa Andrei |
#2
|
|||
|
|||
You can call can_moderate() in a plugin - it's in includes/functions.php around line 6567:
Code:
/** * Returns whether or not the given user can perform a specific moderation action in the specified forum * * @param integer Forum ID * @param string If you want to check a particular moderation permission, name it here * @param integer User ID * @param string Comma separated list of usergroups to which the user belongs * * @return boolean */ function can_moderate($forumid = 0, $do = '', $userid = -1, $usergroupids = '') |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|