vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Help with vBulletin Integration and Autologin (https://vborg.vbsupport.ru/showthread.php?t=244404)

NBZ4live 06-11-2010 08:34 AM

Help with vBulletin Integration and Autologin
 
Hi,

I'm trying to integrate vBulletin into our product.
The automated account creation and validation of the session from our product works fine in the "init_startup" hook.
But now I have problems to perform an autologin to vBulletin if the Product session is valid and the vBulletin account exists. (without redirection page)

I have now tried this code:

PHP Code:

require_once(DIR '/includes/functions_login.php');
    
$vbulletin->session->created false;
    
process_new_login(''false''); 

after filling
PHP Code:

$vbulletin->userinfo 

with information ("userid, usergroupid, membergroupids, infractiongroupids, username, password, salt") from the user table.

The Problem is: vBulletin generates a session and sets a cookie, but the userid in the session row and the cookie is 0.

Please help to solve this problem.

Thanks in advance.

Best Regards,
NBZ4live

NBZ4live 06-15-2010 08:40 AM

Nobody an idea?
I already tried many ways to do that, but nothing helps.
I have successfully logged in user by editing the userid in his entry in the sessions table, but thew user will be loged in after a refresh. I can't use do_login_redirect(), because the redirect page makes another redirect and so on.

NBZ4live 06-16-2010 09:03 AM

Ok. Have solved this by my own. You can close the topic.

aussiev8 11-01-2010 11:32 AM

what did you do to solve this? I've been trying to fake a session all day, and although my cookie's and db are set fine.. vb just creates a new session... its driving me crazy

tommythejoat 07-30-2011 04:16 PM

I have exactly the same problem as was discussed above.

My single Signon using forms based authentication on a Windows server was working fine with vB3.8 for a year or so, but with vB4 the do_login_redirect triggers an infinite redirect.

My code transparently creates a vB account or logs the user in if their email address matches between vBulletin and my CRMS. I execute the login and my code with a button and it works fine, but if I have it fire from a hook, it gives the infinite redirect in v4.

otlayi 08-20-2011 02:20 PM

Quote:

Originally Posted by NBZ4live (Post 2054420)
Ok. Have solved this by my own. You can close the topic.

I HATE people who take the time to post a problem on the forums, and even post a followup asking for more help, then "I solved it, not going to bother wasting anyone's time by telling them how, solve it on your own +++++++". If you're going to waste your time writing and saying you fixed it, at least say a couple words for people who also run into the same problem.

Quote:

Originally Posted by tommythejoat (Post 2226919)
I have exactly the same problem as was discussed above.

My single Signon using forms based authentication on a Windows server was working fine with vB3.8 for a year or so, but with vB4 the do_login_redirect triggers an infinite redirect.

My code transparently creates a vB account or logs the user in if their email address matches between vBulletin and my CRMS. I execute the login and my code with a button and it works fine, but if I have it fire from a hook, it gives the infinite redirect in v4.

Sounds exactly like what I've got, and was only a problem after vB4. It's do_login_redirect() that throws to a white page, logged in just fine, but redirect will never properly go through. Very, very frustrating to say the least..


All times are GMT. The time now is 07:23 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.01839 seconds
  • Memory Usage 1,729KB
  • 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
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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