The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
I know this is an old question, but I searched the forum and couldn't come up with anything good. Here's what I'm doing right now...
PHP Code:
I guess global.php does not check for active user sessions in the cookies? How do I go about checking to see if a user is already actively logged in using PHP? |
|
#2
|
|||
|
|||
|
Try:
PHP Code:
|
|
#3
|
|||
|
|||
|
That did not work, I am still getting the 'Unregistered' username, and a userid of 0.
|
|
#4
|
|||
|
|||
|
Are you currently signed in when you check that page?
Is this file on a different subdomain then your forums? If so, do you have vBulletin Options -> Cookies and HTTP Header Options -> Cookie Domain setup correctly? |
|
#5
|
|||
|
|||
|
Yep, currently signed in.
Nope, not on a subdomain. Also, using VB version 3.6.7, perhaps that makes a difference :-) |
|
#6
|
|||
|
|||
|
I used
Code:
require_once('./global.php');
if (!$vbulletin->userinfo['userid'])
{
print_no_permission();
}
// do what you want for logged in users
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|