chore: Unify user related events to always provide a `getUid` method

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
pull/48332/head
Ferdinand Thiessen 2 years ago
parent f3aa004b1c
commit b4ec7ca559
No known key found for this signature in database
GPG Key ID: 45FAE7268762B400
  1. 7
      core/Events/BeforePasswordResetEvent.php
  2. 7
      core/Events/PasswordResetEvent.php
  3. 2
      lib/public/AppFramework/Bootstrap/IRegistrationContext.php
  4. 7
      lib/public/User/Events/PasswordUpdatedEvent.php
  5. 7
      lib/public/User/Events/UserDeletedEvent.php
  6. 7
      lib/public/User/Events/UserLoggedInEvent.php

@ -34,6 +34,13 @@ class BeforePasswordResetEvent extends Event {
return $this->user;
}
/**
* @since 31.0.0
*/
public function getUid(): string {
return $this->user->getUID();
}
/**
* @since 25.0.0
*/

@ -34,6 +34,13 @@ class PasswordResetEvent extends Event {
return $this->user;
}
/**
* @since 31.0.0
*/
public function getUid(): string {
return $this->user->getUID();
}
/**
* @since 25.0.0
*/

@ -69,7 +69,7 @@ interface IRegistrationContext {
* @param string $name
* @param callable $factory
* @psalm-param callable(\Psr\Container\ContainerInterface): mixed $factory
* @param bool $shared
* @param bool $shared If set to true the factory result will be cached otherwise every query will call the factory again
*
* @return void
* @see IContainer::registerService()

@ -49,6 +49,13 @@ class PasswordUpdatedEvent extends Event {
return $this->user;
}
/**
* @since 31.0.0
*/
public function getUid(): string {
return $this->user->getUID();
}
/**
* @return string
* @since 18.0.0

@ -34,4 +34,11 @@ class UserDeletedEvent extends Event {
public function getUser(): IUser {
return $this->user;
}
/**
* @since 31.0.0
*/
public function getUid(): string {
return $this->user->getUID();
}
}

@ -45,6 +45,13 @@ class UserLoggedInEvent extends Event {
return $this->user;
}
/**
* @since 31.0.0
*/
public function getUid(): string {
return $this->user->getUID();
}
/**
* @since 21.0.0
*/

Loading…
Cancel
Save