PeteBekisz
02-20-2005, 04:06 AM
Hi all :)
Was wondering how I could easily access the $bbuserinfo array from a non-VB page. I have created a script that will practically re-create it, but it only works if the user tells vB to remember them. Anyone have any ideas for either changing this code or accessing bbuserinfo?
<?php
if ($_COOKIE['bbuserid']) {
$db = new gt_mysql;
$v = $db->db_selectData("SELECT * FROM user WHERE userid = '$bbuserid'");
$db->db_close;
$r = mysql_fetch_row($v);
$userInfo['id'] = $r[0];
$userInfo['groupid'] = $r[1];
$userInfo['name'] = $r[4];
$userInfo['email'] = $r[7];
$userInfo['join'] = date("m/d/Y", $r[17]);
return $userInfo;
}
?>
Was wondering how I could easily access the $bbuserinfo array from a non-VB page. I have created a script that will practically re-create it, but it only works if the user tells vB to remember them. Anyone have any ideas for either changing this code or accessing bbuserinfo?
<?php
if ($_COOKIE['bbuserid']) {
$db = new gt_mysql;
$v = $db->db_selectData("SELECT * FROM user WHERE userid = '$bbuserid'");
$db->db_close;
$r = mysql_fetch_row($v);
$userInfo['id'] = $r[0];
$userInfo['groupid'] = $r[1];
$userInfo['name'] = $r[4];
$userInfo['email'] = $r[7];
$userInfo['join'] = date("m/d/Y", $r[17]);
return $userInfo;
}
?>