PDA

View Full Version : vB Cookie Variables


Chriss74
27 Nov 2007, 20:00
Hello vB-User!

Which variables are saved in the vB Cookie?

With $_COOKIE['vbuserid'] I get the vbuserid and with $_COOKIE['vbpassword'] I get the password. Are there any othe variables saved in the vB Cookie (e. g. username)?

Thanks for any hint!

Greetings,
Chriss

Danny.VBT
28 Nov 2007, 23:04
You can var_dump the $_COOKIE array and take a look at the contents. Also, make sure to access cookie variables with $vbulletin->input->clean_array_gpc('c', array(COOKIE_PREFIX .'cookevar' => 'TYPE_WHATEVER'));

Chriss74
29 Nov 2007, 01:02
Thanks for your answer!

Can you explain, how I can var_dump the Cookie-Array? I don't want to include global.php or other vB-Files, but just want to get all Cookie-Infos. What I need is the username. Can I read out the username from the Cookie?

Thanks,
Chriss

Danny.VBT
29 Nov 2007, 22:20
Well, you'd have to run a query of some sort. Either query the session table with the session hash to get the username (I am not sure if username is a column in the session table off the top of my head) or use the sessionhash to leftjoin the user table with the userid....

but I would just include global.php. Is there any reason you don't want too?