I recently switched from phpbb to Vbulletin and I am completly lost.
I have this tiny script that I am trying to convert but I'm not having any luck.
All it does is check to see if user is logged in, if they are it passes the username/gender along.
Any ideas on how I would convert this to work with vbulletin?
PHP Code:
$uid = $_GET['uid']
db::connect();
$result = db::select("session_id='".$_GET['uid']."'","phpbb_sessions");
$userId = $result[0]['session_user_id'];
if (isset($userId))
{
$result = db::select("user_id = $userId", "phpbb_users");
$row1 = $result[0];
echo xml::node('auth', array (
'username' => $row1['username'],
'gender' => $row1['user_gender']-1,
));
} else {
echo '<error = "1" />';
}
Any help would be greatly appreciated!
Thanks