Log in

View Full Version : Username in a cookie


nevetS
05-01-2007, 06:07 PM
Inspecting my cookies I see that the userid is stored, but I want the username so that I can have "Welcome back <username>" on my html pages without having to query the database.

I tried putting a plugin together on login_verify_success to do vbsetcookie('username',$vbulletin->userinfo->['username'],true, true,true)

but that didn't work.

I also tried just $userinfo->['username']

without success.

I'm sure that the variable is around somewhere, but I can't figure out the name of it.

bluesoul
05-01-2007, 06:27 PM
$vbulletin->userinfo['username'] is the correct format.

nevetS
05-01-2007, 10:10 PM
Thanks. Apparently the third parameter was the problem for me. When I set it to false, the cookie showed up properly.