summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2021-10-13 16:11:22 +0200
committerGitHub <noreply@github.com>2021-10-13 16:11:22 +0200
commit581862b51b8a3322a518bdd216e7fcd6f60f4bfc (patch)
tree87e2084544321c9cf368510ae6fef51a550245fd /lib
parentc9918477abfd125d05e4acf475d18f1472bbe3a3 (diff)
parent0d2c2ab62996ccbeed4d03383980a841c8473b13 (diff)
downloadnextcloud-server-581862b51b8a3322a518bdd216e7fcd6f60f4bfc.tar.gz
nextcloud-server-581862b51b8a3322a518bdd216e7fcd6f60f4bfc.zip
Merge pull request #29187 from nextcloud/fix/noid/passwordless-app-password-generation
Diffstat (limited to 'lib')
-rw-r--r--lib/private/legacy/OC_User.php4
-rw-r--r--lib/public/User/Events/UserLoggedInEvent.php6
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/legacy/OC_User.php b/lib/private/legacy/OC_User.php
index 848f460dac5..27c4f6b2857 100644
--- a/lib/private/legacy/OC_User.php
+++ b/lib/private/legacy/OC_User.php
@@ -190,7 +190,7 @@ class OC_User {
'post_login',
[
'uid' => $uid,
- 'password' => '',
+ 'password' => null,
'isTokenLogin' => false,
]
);
@@ -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;
}