/** * following * This get the user list followed by an user * @param array $input */ public static function following($input) { if (AmpConfig::get('sociable')) { $username = $input['username']; if (!empty($username)) { $user = User::get_from_username($username); if ($user !== null) { $users = $user->get_following(); ob_end_clean(); echo XML_Data::users($user); } else { debug_event('api', 'User `' . $username . '` cannot be found.', 1); } } else { debug_event('api', 'Username required on following function call.', 1); } } else { debug_event('api', 'Sociable feature is not enabled.', 3); } }