The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Need IsAdmin function
I need an IsAdmin function that works like the CanModerate function but only returns a true flag if the user is a member of the Administrator group.
Can anyone please help? |
#2
|
|||
|
|||
Do you want this for templates, or for files?
You can just use this: PHP Code:
|
#3
|
|||
|
|||
That works! thanks!
|
#4
|
|||
|
|||
No problem
|
#5
|
||||
|
||||
Code:
// if the admin groupid is 6 (as default) $isAdmin = is_member_of(6); // boolean -------------------------------- PS: Also you can use it in templates: Code:
<if condition="is_member_of(6)"> <p>you are an admin.</p> </if> |
#6
|
||||
|
||||
or, you can include('./includes/adminfunctions.php'); then do if (can_administer())
|
#7
|
||||
|
||||
is_member_of() needs the $bbuserinfo passed over to it as well though:
if (is_member_of($bbuserinfo, 6)) {} |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|