]> git.mxchange.org Git - friendica.git/commitdiff
api_get_user() should not return false right away if the number in the URL is not...
authorPierre Rudloff <contact@rudloff.pro>
Tue, 10 Apr 2018 08:46:10 +0000 (10:46 +0200)
committerPierre Rudloff <contact@rudloff.pro>
Tue, 10 Apr 2018 08:46:10 +0000 (10:46 +0200)
include/api.php

index 645d82a461c63adc4f80eb5230da7965bb202af4..ffe193ab9edbfd61330e4a9836160527d3d57706 100644 (file)
@@ -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);