$result = mysql_query("SELECT uid, name, uname, user_avatar, last_login,profile_id, Sex FROM ".$xoopsDB->prefix("profile_profile").",".$xoopsDB->prefix("users")." WHERE profile_id=uid ORDER BY name ASC");
$result = mysql_query("SELECT uid, groupid, name, uname, user_avatar, last_login,profile_id, Sex FROM ".$xoopsDB->prefix("groups_users_link").",".$xoopsDB->prefix("profile_profile").",".$xoopsDB->prefix("users")." WHERE groupid=4 AND profile_id=uid ORDER BY name ASC");
global $xoopsUser;
echo $xoopsUser->getVar('name') . '
';
$profile_handler =& xoops_getmodulehandler('profile','profile');
$uid = intval($_GET['uid']); //get uid from url
if ($uid <= 0) {
if (is_object($xoopsUser)) {//if member
$profile = $profile_handler->get($xoopsUser->getVar('uid'));} //get uid for the connected member
else {
header('location: ' . XOOPS_URL); //back to homepage - redirect wherever you want
exit();
}
}
else
{
//$profile = $profile_handler->get($xoopsUser->getVar('uid'));
$profile = $profile_handler->get($uid);
}
echo $profile->getVar('Sex') . '
';