The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Get user info from a userid
Hi all,
How do I get user information from a user id in the PHP code? |
#2
|
||||
|
||||
You can see what is available with print_r($vbulletin->userinfo) I think.
|
#3
|
|||
|
|||
Hi RedTyger,
Is that the userinfo of the person who is logged in, then? |
#4
|
||||
|
||||
$vbulletin->userinfo['userid']
|
#5
|
|||
|
|||
Not working, inside class_dm_infraction.php;
PHP Code:
The script already has: $this->fetch_field('whoadded') which contains the ID of the user (moderator) who gave the infraction). From this, I need user data. Can also assume the staff who is giving the infraction is also logged in, can't we? If so - then why doesn#t $vbulletin->userinfo work? |
#6
|
||||
|
||||
Try $this->registry->userinfo['userid'].
|
#7
|
|||
|
|||
Hi Dismounted,
Is there some sort of lookup function I am missing where I can pass a User ID and have it return user information? I'm surprised there isn't one. Best, |
#8
|
||||
|
||||
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|