Rearranged scope check

This commit is contained in:
Michael 2021-06-08 09:11:56 +00:00
parent 95cac04540
commit 9720ee2c20
3 changed files with 36 additions and 57 deletions

View 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 [];
}