View Full Version : vB Cookie Variables
Chriss74
11-27-2007, 06:00 PM
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
Guest190829
11-28-2007, 09:04 PM
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
11-28-2007, 11:02 PM
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
Guest190829
11-29-2007, 08:20 PM
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?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.