From c48beaaf29c54893702c4d1bc290ef84beb60651 Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Tue, 28 Feb 2017 11:17:30 -0500 Subject: [PATCH] Show content in user.php - refs BT#12242 --- user.php | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/user.php b/user.php index 82e6f3d033..9ac68d9522 100755 --- a/user.php +++ b/user.php @@ -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 (empty($array_keys)) { + // we cant find your friend + header('Location: whoisonline.php'); + exit; +} + +$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 { - // we cant find your friend - header('Location: whoisonline.php'); - exit; - } -} else { - // we cant find your friend - header('Location: whoisonline.php'); - exit; +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();