]> git.mxchange.org Git - friendica.git/commitdiff
Fixed handling of return value
authorMichael <heluecht@pirati.ca>
Thu, 18 Nov 2021 21:18:00 +0000 (21:18 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 18 Nov 2021 21:18:00 +0000 (21:18 +0000)
include/api.php

index 4259f4349a9d3136f9f2b81da52581762565b4e9..0536e7a75df7b88ae7dc07e6a0633a052d6cfdcf 100644 (file)
@@ -341,7 +341,7 @@ function api_get_user($contact_id = null)
                $user = Strings::normaliseLink($contact_id);
                $url = $user;
                $extra_query = "AND `contact`.`nurl` = ? ";
-               if (BaseApi::getCurrentUserID() !== false) {
+               if (!empty(BaseApi::getCurrentUserID())) {
                        $extra_query .= "AND `contact`.`uid`=" . intval(BaseApi::getCurrentUserID());
                }
        }
@@ -356,7 +356,7 @@ function api_get_user($contact_id = null)
 
                $url = $user;
                $extra_query = "AND `contact`.`nurl` = ? ";
-               if (BaseApi::getCurrentUserID() !== false) {
+               if (!empty(BaseApi::getCurrentUserID())) {
                        $extra_query .= "AND `contact`.`uid`=" . intval(BaseApi::getCurrentUserID());
                }
        }