View Full Version : Getting a Users ID
Rusticspec
02-11-2007, 02:42 PM
I have made a few custom pages and I want to get the Users ID so I can use it on that page..
Is there a way of just printing out a general Vb Phrase or have I got the wrong end of the stick..
Thanks in advance :)
ragtek
02-11-2007, 03:47 PM
$name=$vbulletin->userinfo['username']; or for the id userinfo['userid']
Rusticspec
02-11-2007, 04:11 PM
$name=$vbulletin->userinfo['username']; or for the id userinfo['userid']
doesnt seem to work, where I put that line in, it prints out =Array['username']; when surely it should print out nothing, because I am only assigning it to a variable.:confused:
RedTyger
02-11-2007, 04:57 PM
$vbulletin->userinfo['userid']
ragtek
02-11-2007, 05:27 PM
oh damn
for me it was clear to use $vbulletin-> sorry
akanevsky
02-11-2007, 06:13 PM
If you use it in a template, use:
$bbuserinfo[username] and $bbuserinfo[userid]
If you use it in code, use $vbulletin->userinfo instead of $bbuserinfo.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.