PDA

View Full Version : Function to fetch a username from a userid?


LanciaStratos
03-12-2008, 05:34 AM
I'm integrating my own script with vBulletin by simply including global.php at the top of my file, and I'd like to display the username a particular user ID is associated with on my custom pages. Is there a simple, built-in vBulletin function similar to the handy $vbulletin->userinfo['userid'] method? I could obviously write my own and run the query on the vB database myself, but I'd rather not access my forum db directly unless I absolutely have to. Is there a better way to go about this? Thanks for your patience with this simple question... :o

Dismounted
03-12-2008, 06:23 AM
$userinfo = fetch_userinfo($userid);

LanciaStratos
03-12-2008, 08:56 PM
Simple, elegant, and perfect! Thanks so much! :)