The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Discriminate User-Login by Cookie
Hi all!
I would like to know how to know if the current user is logged in by cookie check. i mean, as i dont' know very well how vB works about the login System (i've already read many post on this forum about...), i'm wondering if vB set a cookie on the client that make possible my site (on another server - another platform - another subdomain) can know if the current user is CURRENTLY LOGGED IN. I know that vB set a cookie like "bbUserId" (and that i can set cookie readable from all subdomain) ... but i'm afraid that this cookie will be available ALSO when the forum sessions are EXPIRED, when the user close the page immediately after LogOut and before the php can clear the Cookies, When the users hack his cookie system or the Clock of the computer... I'm thinking some alternative solutions, as: to constrain vBulletin to set a Cookie with the SessionID of the current user, so myExternalSystem can call (server-side) a little php page (i will build) that give it a response about the state of the session that have SessionID as passed in parameters, that's the SessionID myExtSys has read in the Cookies. if php return that these sessionID correspond to a CURRENTLY LOGGED USER, myExtSys can store the UsersInfo in myExtSys.Session and make accessible some section of my site. When myExtSys.Session EXPIRES... i check again the cookie... and again all. May this solution works? Is there an easier solution? maybe the single 'bbUserID' cookie is already a SURE check that the User is CURRENTLY LOGGED IN? have you any solution/suggest/link? Thank you! |
#2
|
||||
|
||||
Include vBulletin's global.php and check if $vbulletin->userinfo['userid'] is empty. Empty means the user is logged out.
|
#3
|
|||
|
|||
Thank you for the apply
Sure this would be a good method... if i ran my application on the same server and on the same platform... My application, on the contrary, run on IIS with ASP.NET, so i can't include global.php Anyway i continued my research on workaround and now i know that i can use cookies to access directly form ASP.NET to the mySQL db and verify the login... i've only to implement an Hook in the vBulletin that call my ASP.NET Logout when an user LOG OUT in the forum. it seems easy! |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|