From 2d5989a6bdbedbcc75c4ce46a05e09854ce2ce9e Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 18 Nov 2021 21:18:00 +0000 Subject: [PATCH] Fixed handling of return value --- include/api.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/api.php b/include/api.php index 4259f4349a..0536e7a75d 100644 --- a/include/api.php +++ b/include/api.php @@ -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()); } } -- 2.39.5