View Full Version : How can I get the username of the profile I am viewing
ParagonDev
04-19-2008, 05:49 PM
I am adding a mod to a player's profile. I added a plugin and have it showing, but I don't know how to get the name of the person who's profile you are viewing. Like $vbulletin->userinfo['username'] is for your username, how do I get the username of the person who's profile your viewing
Using 3.6.9
Lynne
04-19-2008, 06:05 PM
I believe it is just plain $userinfo['username'] or actually just $userinfo[username] (no single quotes) if you are using it in the template.
$vbulletin->userinfo['username'] and $bbuserinfo['username'] would be of the person *doing* the viewing - you in this case.
ParagonDev
04-19-2008, 07:14 PM
I believe it is just plain $userinfo['username'] or actually just $userinfo[username] (no single quotes) if you are using it in the template.
$vbulletin->userinfo['username'] and $bbuserinfo['username'] would be of the person *doing* the viewing - you in this case.
What about outside the template
Lynne
04-19-2008, 08:21 PM
I think it's without the single-quotes in a plugin and with the single-quotes in the template. (I always just try it and see.)
Opserty
04-19-2008, 08:49 PM
PHP: $userinfo['username']
Templates: $userinfo[username]
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.