vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   vB Cookie Variables (https://vborg.vbsupport.ru/showthread.php?t=163737)

Chriss74 11-27-2007 06:00 PM

vB Cookie Variables
 
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?


All times are GMT. The time now is 01:08 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01122 seconds
  • Memory Usage 1,706KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete