summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJulien Veyssier <eneiluj@posteo.net>2021-10-13 12:37:34 +0200
committerJulien Veyssier <eneiluj@posteo.net>2021-10-13 12:37:34 +0200
commit0d2c2ab62996ccbeed4d03383980a841c8473b13 (patch)
tree575afe1440fa8555f1dd04bf8ad0810732a8024a /lib
parentde5fea4a007e3c668a4f7ce24625118b3dc17fbe (diff)
downloadnextcloud-server-0d2c2ab62996ccbeed4d03383980a841c8473b13.tar.gz
nextcloud-server-0d2c2ab62996ccbeed4d03383980a841c8473b13.zip
allow null password in UserLoggedInEvent
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/legacy/OC_User.php2
-rw-r--r--lib/public/User/Events/UserLoggedInEvent.php6
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/legacy/OC_User.php b/lib/private/legacy/OC_User.php
index 96c8d1ec332..27c4f6b2857 100644
--- a/lib/private/legacy/OC_User.php
+++ b/lib/private/legacy/OC_User.php
@@ -199,7 +199,7 @@ class OC_User {
$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 b9b36544231..b1a46b9570d 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 @@ class UserLoggedInEvent extends Event {
/**
* @since 18.0.0
*/
- public function getPassword(): string {
+ public function getPassword(): ?string {
return $this->password;
}