View Full Version : username in global.php (easy)
Takara
05-08-2002, 08:22 PM
I'm trying to do this in global.php
if($bbuserinfo['userid'] != 0) {
$wb_huh = "Welcome back, $bbuserinfo[username]";
}else{
$reg_huh = "Welcome Guest!";
}
It kinda works like vb.org's. But $bbuserinfo[username] doesnt return the username. What does?
Thankies ^_^ :bunny:
Scott MacVicar
05-08-2002, 08:30 PM
you have to put it after
if (!$servertoobusy) {
require('./admin/sessions.php');
} else {
$session = array();
$bbuserinfo = array();
}
as the bbuserinfo array isn't loaded till then.
I use
if(!$bbuserinfo[userid]) {
$welcome_msg = "Welcome Guest!";
} else {
$welcome_msg = "Welcome back, $bbuserinfo[username]";
}
though ig you are only going to use it on the forum index you should modify the /index.php page at the point which checks if its a registered user or guest.
Takara
05-08-2002, 09:03 PM
hehe, okie <^_^;
Thankyou
Takara
05-08-2002, 09:04 PM
Oh, one other thing PPM. Do you know if its possible to get the userid from a username? Know what I mean? >.<
Nm! I figured it out ^^ :bunny:
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.