vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Auto login user (https://vborg.vbsupport.ru/showthread.php?t=118714)

LunchBreak 06-15-2006 10:55 PM

Auto login user
 
Hi I am doing a autologin for users who come from my site. When they come to vBulletin they are not asked for any credentials. I have the userid in my hand. So, this is how I am trying to log the user in.
$newuserid is the userid I already know.

$newsession->set('userid', $newuserid);
$newsession->set('loggedin', 1);
$newsession->set('bypass', 1);
$newsession->set_session_visibility(($vbulletin->superglobal_size['_COOKIE'] > 0));
$vbulletin->session =& $newsession;

I have set it in global_start. It logs the user fine! but the problem is the first time it logs the user in, it does not show the user as logged in on navbar. However, when I refresh the page, shows the user as logged in.

I believe, I am defining the session after the page is loaded.

Question 1:
How can I escape the login redirect and log the user directly in without refreshing?

It would be of big help if someone could answer my questions ASAP.

Cheers,
Kaiser.

LunchBreak 06-20-2006 02:55 AM

Could anyone please help me with this?
I believe it is cookie problem since I am not using the login redirect!


All times are GMT. The time now is 03:13 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.00982 seconds
  • Memory Usage 1,705KB
  • 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
  • (2)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