The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
vB Auth system
Hello all,
I'm using only the forum and all but I want to use the vB user system on the rest off my website as well. How can I use vB if a user is logged on and what his user name is? Thanks! |
#2
|
|||
|
|||
Hey,
We do something similar to this on our site (albeit that runs on vB 3.8.*). The first thing you do is add an include to the vB global.php (Assuming your file is in the forumroot folder): Code:
require_once("./global.php"); Code:
if (!$vbulletin->userinfo['userid']) { print_no_permission(); } Code:
$vbulletin->userinfo['username'] HTH. Peter |
#3
|
|||
|
|||
You can also include only the init.php (if you need only the userdata). It's a little bit faster
|
#4
|
|||
|
|||
For any others that still want to know how I did this: used the code of init.php, while removing lots of unneeded stuff like the hooks loading etc, and for vB for this is the username:
$vbulletin->datastore->registry->userinfo['username']; |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|