PDA

View Full Version : usergroup variable?


Murtific
07-26-2011, 01:29 AM
Is there a built in variable that lets you pull the usergroup ID that a user is in??? I have some ideas to get around, but.. really ghetto.....

Would love to know if this var exists :eek:

--------------- Added 1311647992 at 1311647992 ---------------

<vb:if condition="$bbuserinfo['usergroupid'] == 6">Global Level: <input readonly="readonly" value="6" type="text" size="5" /></vb:if>
<vb:if condition="$bbuserinfo['usergroupid'] == 7">Global Level: <input readonly="readonly" value="7" type="text" size="5" /></vb:if>
<vb:if condition="$bbuserinfo['usergroupid'] == 5">Global Level: <input readonly="readonly" value="5" type="text" size="5" /></vb:if>
<vb:if condition="$bbuserinfo['usergroupid'] == 9">Global Level: <input readonly="readonly" value="9" type="text" size="5" /></vb:if>


I mean... REALLY.. ffs..... gotta be a better way tho..... :eek:

kh99
07-26-2011, 01:49 AM
I think you want {vb:raw bbuserinfo.usergroupid}.

Murtific
07-26-2011, 01:51 AM
awesome.. step two...

i'm trying to make a plugin

mysql_query("UPDATE members SET global = $bbuserinfo['usergroupid'] WHERE username = '$usernamefield' ", $connection);

what's the correct variable...... its driving me nuts!!!

kh99
07-26-2011, 01:54 AM
I think that would be $vbulletin->userinfo[usergroupid]

Murtific
07-26-2011, 01:58 AM
I think that would be $vbulletin->userinfo[usergroupid]

ffsssssssssssssssssss..... dummy of the century goes toooooo................ :p

gawsh, thanks!

--------------- Added 1311649557 at 1311649557 ---------------

I also got around it by putting it in an input field and making it update in my database heh..... both work swell tho