The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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).
|
#2
|
||||
|
||||
use
PHP Code:
PHP Code:
|
#3
|
|||
|
|||
i think he was more searching for something like "Who's Online, AND Where..." ...
|
#4
|
|||
|
|||
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. |
#5
|
||||
|
||||
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.
|
#6
|
||||
|
||||
vb also checks cookies if user is browsing via cookies
|
#7
|
|||
|
|||
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? ( |
#8
|
||||
|
||||
probably in either the global.php or the includes/session.php...
|
#9
|
|||
|
|||
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. |
#10
|
||||
|
||||
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... |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|