The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
User ID in VB
Hello,
I whould like get ID of the users logged in, in my program . How I can do it ? the user ID write in session or cookie ? Thank you, Majid |
#2
|
|||
|
|||
You mean you want the userid of the user loading the page? Or of all online users?
|
#3
|
|||
|
|||
Quote:
Now I want to do sth that my user IDs would be saved in my database as they log in. for instance When my forums system were PHPBB the user information was saved in a session that I could use it anywhere in my site. |
#4
|
|||
|
|||
I am also looking for this information. I tried the following:
PHP Code:
|
#5
|
|||
|
|||
$vbulletin->userinfo['userid'] is the proper variable now days.
Though, requiring vbulletin's files may screw with the enviroment of your scripts. |
#6
|
|||
|
|||
Yes you should be using $vbulletin->userinfo for vB3.5.
Also please note that you will have problems if you include global.php like that. You should first chdir() to your forum homedirectory, then require global.php, and if needed chdir back. |
#7
|
|||
|
|||
Not anymore Marco, ever wonder why all the requires() use "DIR" now?
Define DIR as the forum's full path, and you can require it like that. |
#8
|
|||
|
|||
Hmm i guess it would work if you manually define DIR.
Normal global.php is the exception to the DIR rule, since it will set it to the current directory if not set yet. |
#9
|
|||
|
|||
Which is why you need to define it first, but at least you dont have to muck around with chdir anymore
|
#10
|
||||
|
||||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|