vB 3.8.4
I'm using the usual include globals.php and $vbulletin->userinfo['userid'] to have an external page only visible to logged-in vB users.
something in globals.php - or its includes - is not letting me do the checking for a logged-in user (see code below). Instead, it presents a login form under the page URL, not the login URL.
if my locked-down page is:
http://mysite.com/you-cant-see-this/
When I submit the login form there, of course, I get an error because it submits to:
http://mysite.com/you-cant-see-this/login.php?do=login
The code I'm using goes like this...
PHP Code:
chdir('/server/path/to/forums/');
require_once('global.php');
if (!$vbulletin->userinfo['userid']) {
.. etc...
But when a user is not logged in, the script never reaches the IF because something in globals.php just goes ahead and builds the standard login page.
Is there a way to absolutely force logins only on the standard vB forum login URL?
Or is there something else I can do here to be able to check the logged-in status of the user correctly?