diff --git a/lib/private/legacy/OC_User.php b/lib/private/legacy/OC_User.php index 848f460dac5a8..27c4f6b2857ba 100644 --- a/lib/private/legacy/OC_User.php +++ b/lib/private/legacy/OC_User.php @@ -190,7 +190,7 @@ public static function loginWithApache(\OCP\Authentication\IApacheBackend $backe 'post_login', [ 'uid' => $uid, - 'password' => '', + 'password' => null, 'isTokenLogin' => false, ] ); @@ -199,7 +199,7 @@ public static function loginWithApache(\OCP\Authentication\IApacheBackend $backe $dispatcher->dispatchTyped(new UserLoggedInEvent( \OC::$server->get(IUserManager::class)->get($uid), $uid, - '', + null, false) ); diff --git a/lib/public/User/Events/UserLoggedInEvent.php b/lib/public/User/Events/UserLoggedInEvent.php index b9b36544231fa..b1a46b9570dce 100644 --- a/lib/public/User/Events/UserLoggedInEvent.php +++ b/lib/public/User/Events/UserLoggedInEvent.php @@ -37,7 +37,7 @@ class UserLoggedInEvent extends Event { /** @var IUser */ private $user; - /** @var string */ + /** @var string|null */ private $password; /** @var bool */ @@ -49,7 +49,7 @@ class UserLoggedInEvent extends Event { /** * @since 18.0.0 */ - public function __construct(IUser $user, string $loginName, string $password, bool $isTokenLogin) { + public function __construct(IUser $user, string $loginName, ?string $password, bool $isTokenLogin) { parent::__construct(); $this->user = $user; $this->password = $password; @@ -74,7 +74,7 @@ public function getLoginName(): string { /** * @since 18.0.0 */ - public function getPassword(): string { + public function getPassword(): ?string { return $this->password; }