The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Can I check for banned user in a template?
How can I check in a template to see if a user is banned? I tried just checking for the banned usergroup, but that doesn't seem to work. What could I be doing wrong?
Here is what I'm using: <if condition="$bbuserinfo['usergroupid'] == 19"> but the banned users seem to pass that conditional right over. |
#2
|
||||
|
||||
Use
<if condition="$post[usergroupid] == 19"> or remove the ' <if condition="$bbuserinfo[usergroupid] == 19"> |
#3
|
|||
|
|||
Hmmm, neither seem to work. I'm doing a bunch of checking in the header to see if a user is in different groups. All the others seem to work just fine. Is there some sort of limit on IF ELSE statements I can do? I currently have 4 lined up...
|
#4
|
||||
|
||||
Depending on what template you're trying to check...
Code:
<if condition="is_member_of($bbuserinfo,9)">You're banned.</if> What exactly are you trying to do? |
#5
|
|||
|
|||
Got it! It was actually a problem with template changes not trickling down. Basically, I'm stupid.
Anyway, when using that is_member_of, it will check for secondary groups too, right? |
#6
|
||||
|
||||
Yep, that's why it's better to use than $bbuserinfo[usergroupid].
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|