![]() |
Where does vB check login
I want to check that a user is logged in to somewhere else (Hivemail) but I can't find the script that vB uses to check whether someone is logged in (the sessions / cookies bit).
|
use
PHP Code:
PHP Code:
|
i think he was more searching for something like "Who's Online, AND Where..." ...
|
No, I mean that whenever you go to a page in vB, it checks to see if you are logged in. I want to know where it does that.
Then within that function I am going to put the login check for Hivemail, so if they are logged in to vB and not Hivemail, I'll log them in using the vB user/pass. |
vB doesn't actually have a function to check if a person's logged in. It has the session, in which it stores some data, and then one can check if the user is logged in by checking if $bbuserinfo[userid] is equal to 0 (meaning he's not logged in) or if his userid is set, meaning he is logged in.
|
vb also checks cookies if user is browsing via cookies;)
|
Colin: So there is script on every page rather than 1 function? Where is $bbuserinfo[userid] defined?
AN: I know, but where is the code? :(( |
probably in either the global.php or the includes/session.php...
|
I don't think you know exactly what I mean. global.php is included in most if not all pages so it's definitely down that path. Within global.php other files are included, session.php being one of them & the most likely.
What I'm asking is, I want to put in a line of code which gets run every time vB checks to see if someones logged in, where do I put it? I mentioned that it is a login script I am putting in because it would need to be put at the last stage of the vB login check after it has gone through all the variable/session/cookie possibilities. |
Look for it ;)
Sorry, but I'm at work, so I don't have the vB files at hand at the moment. If you haven't found it by this evening I can have a look if I find it... |
All times are GMT. The time now is 05:38 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|