]> git.mxchange.org Git - friendica.git/blobdiff - src/Security/BasicAuth.php
Rearranged scope check
[friendica.git] / src / Security / BasicAuth.php
index e55700bf9e8c350f8c3c069dc842da024001711f..18564d289e73219ba19ab1f85326de6164453f9c 100644 (file)
@@ -46,7 +46,7 @@ class BasicAuth
         *
         * @return int User ID
         */
-       public static function getCurrentUserID(bool $login = true)
+       public static function getCurrentUserID(bool $login)
        {
                if (empty(self::$current_user_id)) {
                        api_login(DI::app(), $login);
@@ -64,7 +64,7 @@ class BasicAuth
         */
        public static function getCurrentApplicationToken()
        {
-               if (empty(self::getCurrentUserID())) {
+               if (empty(self::getCurrentUserID(true))) {
                        return [];
                }