]> git.mxchange.org Git - friendica.git/blobdiff - src/Security/BasicAuth.php
Cleanup work with the activity types
[friendica.git] / src / Security / BasicAuth.php
index eaed9d22e5ae4a9659f37e0df1afae071f00a90b..7c3f3cc9c4b5e5fba8c6e4de7459cfaf56603479 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -24,7 +24,6 @@ namespace Friendica\Security;
 use Exception;
 use Friendica\Core\Hook;
 use Friendica\Core\Logger;
-use Friendica\Core\Session;
 use Friendica\Database\DBA;
 use Friendica\DI;
 use Friendica\Model\User;
@@ -78,9 +77,9 @@ class BasicAuth
                        return [];
                }
 
-               if (!empty(self::$current_token)) {
-                       return self::$current_token;
-               }
+               //if (!empty(self::$current_token)) {
+               //      return self::$current_token;
+               //}
 
                $source = $_REQUEST['source'] ?? '';
 
@@ -191,7 +190,7 @@ class BasicAuth
 
                Hook::callAll('logged_in', $record);
 
-               self::$current_user_id = local_user();
+               self::$current_user_id = DI::userSession()->getLocalUserId();
 
                return self::$current_user_id;
        }