From: Pierre Rudloff Date: Tue, 10 Apr 2018 08:46:10 +0000 (+0200) Subject: api_get_user() should not return false right away if the number in the URL is not... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f3d98b2864f131d6ba6532f81c61fa3d9895bd20;p=friendica.git api_get_user() should not return false right away if the number in the URL is not a valid user --- diff --git a/include/api.php b/include/api.php index 645d82a461..ffe193ab9e 100644 --- a/include/api.php +++ b/include/api.php @@ -577,14 +577,12 @@ function api_get_user(App $a, $contact_id = null) if (is_numeric($user)) { $user = dbesc(api_unique_id_to_nurl(intval($user))); - if ($user == "") { - return false; - } - - $url = $user; - $extra_query = "AND `contact`.`nurl` = '%s' "; - if (api_user() !== false) { - $extra_query .= "AND `contact`.`uid`=" . intval(api_user()); + if ($user != "") { + $url = $user; + $extra_query = "AND `contact`.`nurl` = '%s' "; + if (api_user() !== false) { + $extra_query .= "AND `contact`.`uid`=" . intval(api_user()); + } } } else { $user = dbesc($user);