Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-20-2007, 09:25 PM
4bidden 4bidden is offline
 
Join Date: Feb 2007
Location: Arizona
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How to know if non-cookie user is logged in?

I have modified my board so that there is a link in every users control panel to edit a custom setup page of theirs. The edit page for this is not part of the board (obviously) and the only way I am able to tell if a user is logged in is by checking $_COOKIE. If the user is not using cookies, the $_SESSION is still empty (yes, even after session_start). What method is being used to keep them logged in between pages when not using cookies?

How can I check if a user is logged in if I don't find $_COOKIE info?
Reply With Quote
  #2  
Old 03-19-2007, 03:35 AM
4bidden 4bidden is offline
 
Join Date: Feb 2007
Location: Arizona
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Bump..... seems like this is an easy question? How does vB keep users logged in between pages if cookies are disabled?
Reply With Quote
  #3  
Old 03-25-2007, 01:29 AM
4bidden 4bidden is offline
 
Join Date: Feb 2007
Location: Arizona
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone?
Reply With Quote
  #4  
Old 03-25-2007, 01:42 AM
nexialys
Guest
 
Posts: n/a
Default

sessions are managed in the database. when a user login, or just browse the forum, it is tracked action by action in the sessions system... even without cookies... when someone have the cookies inactive, the session id is kept in the url... so the id is compared with the data in the database, keeping track of the active user.

there is no $_SESSION because vBulletin is not using the default PHP session management, it has its own session manager... you have to call $vbulletin->session to make the same, but also have to load the vBulletin API to make it work...
Reply With Quote
  #5  
Old 03-29-2007, 05:01 AM
kkiely kkiely is offline
 
Join Date: Feb 2004
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have this same problem. I am an amatuer when it comes to coding but I would that if VBulletin is able to keep sessions between pages without a cookie then VB must have a quick way of doing it - which means there must be a quick function or access to a file or something that can be put into a non-vb page. Am I right about this?
Reply With Quote
  #6  
Old 03-29-2007, 10:40 AM
nexialys
Guest
 
Posts: n/a
Default

sessions are kept inside vBulletin, so you have to load your page within vBulletin to be able to retrieve that information...

https://vborg.vbsupport.ru/showthread.php?t=132996 can be helpful for you then.
Reply With Quote
  #7  
Old 03-29-2007, 09:24 PM
kkiely kkiely is offline
 
Join Date: Feb 2004
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

that page is just a variation of the non-vb login that uses the

if ($vbulletin->userinfo['userid']!=0) {

line to check for a cookie. If sessions are carried from page to page within VB then I'm wondering if anyone has found a way to clone that ability outside vb through an include or function or someething.
Reply With Quote
  #8  
Old 03-29-2007, 09:46 PM
WetWired's Avatar
WetWired WetWired is offline
 
Join Date: Jun 2002
Location: Texas
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, you could manually match the session in the link with the sessions table joined with the user table, but if you don't use the vB backend to do it, the session is likely to expire while the user is doing non-vB stuff.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:25 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.04066 seconds
  • Memory Usage 2,218KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (6)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete