PHP Code:
if ($vbulletin->GPC['username'])
{
$getuserid = $db->query_first("
SELECT userid
FROM " . TABLE_PREFIX . "user
WHERE username = '" . $db->escape_string(htmlspecialchars_uni($vbulletin->GPC['username'])) . "'
");
$userid = intval($getuserid['userid']);
$userinfo = fetch_userinfo($userid);
if (!$userinfo OR is_member_of($userinfo, 6));
{
print_stop_message('protected_user');
}
}
else if ($vbulletin->GPC['userid'])
{
$userid = $vbulletin->GPC['userid'];
$userinfo = fetch_userinfo($userid);
if (!$userinfo OR is_member_of($userinfo, 6));
{
print_stop_message('protected_user');
}
$vbulletin->GPC['username'] = unhtmlspecialchars($userinfo['username']);
}
When someone searches for x user's ip address(x user is in usergroup 6)
it should come up with something like No results found
i know how to add error message but can't make conditional to work