The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How to access vBulletin session info from other PHP applications on the same domain?
I coding a small, simple light-weight PHP application (that is, I would like to avoid having to make it a full fledged "product"/plugin for vBulletin 5 Connect at this point) which must access the userid (and subsequently, username and usertitle) of the currently logged-in user in the vBulletin 5 Connect instance that is running on the same domain (that is, my PHP app will have access to the cookies of this vBulletin instance too).
My question is, what would be the simplest and most efficient way to get hold of this currently-logged-in-user-in-vBulletin information from this stand-alone PHP application of mine? I'm guessing that the vBulletin user-sessions are not written to the database, but rather only using some kind of "memory only" PHP session kind of thing, which in turn would prevent me from using a database-only solution where all the above-mentioned information could be resolved directly from the vBulletin database by my application (based on initially looking up the session ID found in the vBulletin cookies etc), right? Is there any good summarized info available for vBulletin 5 Connect for this kind of "Single Sign-On" functionality that anyone here knows of? During my googling, I only managed to find similar info applying to vBulletin 3 (e.g. here), which I've heard has a very different user session handling than vBulletin 5 Connect though? Any hints of any kind would be highly appreciated! |
#2
|
||||
|
||||
That could be help and is the only one I know:
https://forum.vbulletin.com/blogs/da...n-your-website |
#3
|
|||
|
|||
Thanks for your reply!
I've seen that article when googling this, but as far as I can see, you must authenticate with a username and password before you can use any API:s at all like that, which would defeat the purpose of this method entirely for what I'm looking for (which could be described as the "reverse" of what that article is about), or am I misunderstanding something here? This "autoloader.php" only provides access to the vB5 API, right? Where can I find a good documentation for the vB5 API by the way, anyone knows? |
#4
|
|||
|
|||
Good? I don't know. But there is http://vb5support.com/resources/api/
|
#5
|
||||
|
||||
Quote:
This is working for me (vb562 using vb API) look below. When calling the API the currently logged in user session also gets updated The sessions are stored in the database (prefix_session) PHP Code:
$user_info['usertitle'] |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|