Please Log in to join the conversation.
function uddeIMgetGroupID() { // 0=public, 1=registered, 2=special
$database = uddeIMgetDatabase();
$user = JFactory::getUser();
$userid = $user->id;
$sql="SELECT g.id AS gid
FROM (#__users AS u INNER JOIN #__user_usergroup_map AS um ON u.id=um.user_id)
INNER JOIN #__usergroups AS g ON um.group_id=g.id WHERE u.id=".(int)$userid;
$database->setQuery($sql);
$rows = $database->loadObjectList();
$my_gid = Array(); // 1 = Public, 2 = Registered, ...
foreach($rows as $key => $value) {
if ($value->gid<=1)
$my_gid[] = (int)0;
else
$my_gid[] = (int)$value->gid;
}
if (uddeIMisSpecial($my_gid))
return 2;
if (uddeIMisReggedOnly($my_gid))
return 1;
return 0;
}
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.