fix(logging): Restore the option to log with debug level

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2024-03-22 01:04:48 +01:00 committed by Julius Härtl
parent 1c75c5f1e0
commit be5d40e3e2
No known key found for this signature in database
GPG key ID: 4C614C6ED2CDE6DF

View file

@ -39,9 +39,9 @@ use OC\Authentication\Token\IProvider;
use OC\User\LoginException;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\IGroupManager;
use OCP\ISession;
use OCP\IUser;
use OCP\IUserManager;
use OCP\IUserSession;
use OCP\Server;
use OCP\User\Events\BeforeUserLoggedInEvent;
use OCP\User\Events\UserLoggedInEvent;
@ -350,7 +350,7 @@ class OC_User {
* @return string|false uid or false
*/
public static function getUser() {
$uid = Server::get(IUserSession::class)->getUser()?->getUID();
$uid = Server::get(ISession::class)?->get('user_id');
if (!is_null($uid) && self::$incognitoMode === false) {
return $uid;
} else {