|
|
|
@ -19,26 +19,28 @@ require_once 'main/inc/global.inc.php'; |
|
|
|
|
/** |
|
|
|
|
* Access permissions check |
|
|
|
|
*/ |
|
|
|
|
api_block_anonymous_users(); |
|
|
|
|
//api_block_anonymous_users(); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Treat URL arguments |
|
|
|
|
*/ |
|
|
|
|
$array_keys = array_keys($_GET); |
|
|
|
|
|
|
|
|
|
if (!empty($array_keys)) { |
|
|
|
|
$username = substr($array_keys[0],0,20); // max len of an username |
|
|
|
|
$friend_id = UserManager::get_user_id_from_username($username); |
|
|
|
|
|
|
|
|
|
if ($friend_id) { |
|
|
|
|
SocialManager::display_individual_user($friend_id); |
|
|
|
|
} else { |
|
|
|
|
if (empty($array_keys)) { |
|
|
|
|
// we cant find your friend |
|
|
|
|
header('Location: whoisonline.php'); |
|
|
|
|
exit; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
$username = substr($array_keys[0],0,20); // max len of an username |
|
|
|
|
$friend_id = UserManager::get_user_id_from_username($username); |
|
|
|
|
|
|
|
|
|
if (!$friend_id) { |
|
|
|
|
// we cant find your friend |
|
|
|
|
header('Location: whoisonline.php'); |
|
|
|
|
exit; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Display::display_header(get_lang('UserInfo')); |
|
|
|
|
echo SocialManager::display_individual_user($friend_id); |
|
|
|
|
Display::display_footer(); |
|
|
|
|