]> git.mxchange.org Git - friendica.git/commitdiff
Update Base\Api::login to return the authentication status
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 11 Dec 2019 08:32:46 +0000 (03:32 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Wed, 11 Dec 2019 13:24:16 +0000 (08:24 -0500)
src/Module/Base/Api.php

index f3453e0323fc0d22d2c1b74b2babbb8ef1e609aa..08cf96158d51d4147631e783e27e18d0c4ec8e15 100644 (file)
@@ -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;
        }
 
        /**