From: Hypolite Petovan Date: Wed, 11 Dec 2019 08:32:46 +0000 (-0500) Subject: Update Base\Api::login to return the authentication status X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c239d218d87c2f6a9e1bf2ee61318b08a1826c2f;p=friendica.git Update Base\Api::login to return the authentication status --- diff --git a/src/Module/Base/Api.php b/src/Module/Base/Api.php index f3453e0323..08cf96158d 100644 --- a/src/Module/Base/Api.php +++ b/src/Module/Base/Api.php @@ -54,6 +54,7 @@ class Api extends BaseModule * * @brief Login API user * + * @return bool Was a user authenticated? * @throws HTTPException\ForbiddenException * @throws HTTPException\UnauthorizedException * @throws HTTPException\InternalServerErrorException @@ -69,6 +70,8 @@ class Api extends BaseModule api_login(self::getApp()); self::$current_user_id = api_user(); + + return (bool)self::$current_user_id; } /**