The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
VB 5.0 login via API - process_new_login not working after upgrade to VB 5.0
We have integrated our plugin with VB 5.0. When a user registers to our site, we are able to automatically create a VB account for the user and add user to the right forum group etc.
But when a user logs in to our site, the auto-login (single-sign-on) to VB 5.0 is NOT working. It used to work really well in VB 4.x. We make a call to setcookie to set the 'userid' and 'password' and then call the VB API to autologin: process_new_login('', false, ''); Looks like VB 5.0 has removed support for this API. Need help with the single-login integration between our plugin (written in php) and VBulletin 5.0. Has anyone here experienced a similar problem? Any solution for this? Thanks, Veena Prashanth |
#2
|
||||
|
||||
Things changed a bit I guess - but I'm pretty new to all this stuff:
Here is that the user class of the VB API does: PHP Code:
|
#3
|
|||
|
|||
Thanks Marco.
Can't believe this has been made so overly complicated with no documentation on the changes between the VB versions for login. Isn't login a basic function that 3rd party plugins that want to integrate with VB will need? I am surprised that it is so hard to get login integration done. Anyway, i figured out how to do it. It is working now. Wrote my own class that sets these cookies: vbsetcookie(COOKIE_PREFIX . 'userid', $res['userid'], false, true, true); vbsetcookie(COOKIE_PREFIX . 'password', $res['password'], false, true, true); vbsetcookie(COOKIE_PREFIX . 'sessionhash', $res['sessionhash'], false, false, true); Before call vbsetcookie, need to call : $auth = vB_User::verifyAuthentication($username, $password, null, null); if($auth) { $res = vB_User:rocessNewLogin($auth, $vbulletin->GPC['logintype'], $vbulletin->GPC['cssprefs']); if($res) { vbsetcookie(COOKIE_PREFIX . 'userid', $res['userid'], false, true, true); vbsetcookie(COOKIE_PREFIX . 'password', $res['password'], false, true, true); vbsetcookie(COOKIE_PREFIX . 'sessionhash', $res['sessionhash'], false, false, true); } } |
#4
|
||||
|
||||
Quote:
Anyway glad you made it |
#5
|
|||
|
|||
Hi,
I'm trying to implement something similar. Can you share how you were able to do this further? Thanks! |
#6
|
|||
|
|||
If you have this working (auto-login) in vb 5.x would really appreciate some additional info as I am pulling my hair out to gety an auto-login working
Thanx |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|