The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Check if User is in Usergroup (PHP)
Hello,
I am writing a custom script and having some issues verifying if a user is in a usergroup, not in the template file but in the PHP. I tried this but it doesnt seem to be working correctly, What am I doing wrong? Code:
if ($userinfo['usergroupid'] == 6) { somestuff } else { someotherstuff } |
#2
|
|||
|
|||
PHP Code:
|
#3
|
|||
|
|||
Awesome, thanks alot!
|
#4
|
|||
|
|||
Could this be used to enable style selection for certain (sub) usergroups only?
|
#5
|
|||
|
|||
I wonder if this should work in the forum Blocks area?
I have the following:- if (is_member_of($vbulletin->userinfo, 6)) { $my_output = ''; } else { $my_output = ' google adsence code......'; } return $my_output; However no matter what usergroup I choose the advertising is always displayed. 6 is Admin usergroup and I am admin. I choose usergroup 1 for not logged in, and try that without being logged in, but it still displays the advertising. I know its not a cached issue, as I just popped in some test text, and that was displayed. |
#6
|
||||
|
||||
Try adding the following to the top of your Content (PHP code)
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|