![]() |
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) { |
PHP Code:
|
Awesome, thanks alot!
|
Could this be used to enable style selection for certain (sub) usergroups only?
|
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. |
Try adding the following to the top of your Content (PHP code)
PHP Code:
|
All times are GMT. The time now is 06:39 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|