PasswordResetEvent.php 782 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OC\Core\Events;
  8. use OCP\EventDispatcher\Event;
  9. use OCP\IUser;
  10. /**
  11. * Emitted after the user password is reset.
  12. *
  13. * @since 25.0.0
  14. */
  15. class PasswordResetEvent extends Event {
  16. /**
  17. * @since 25.0.0
  18. */
  19. public function __construct(
  20. private IUser $user,
  21. private string $password,
  22. ) {
  23. parent::__construct();
  24. }
  25. /**
  26. * @since 25.0.0
  27. */
  28. public function getUser(): IUser {
  29. return $this->user;
  30. }
  31. /**
  32. * @since 31.0.0
  33. */
  34. public function getUid(): string {
  35. return $this->user->getUID();
  36. }
  37. /**
  38. * @since 25.0.0
  39. */
  40. public function getPassword(): string {
  41. return $this->password;
  42. }
  43. }