UserUpdatedEvent.php 695 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCP\Accounts;
  8. use OCP\EventDispatcher\Event;
  9. use OCP\IUser;
  10. /**
  11. * This event is triggered when the account data of a user was updated.
  12. *
  13. * @since 28.0.0
  14. */
  15. class UserUpdatedEvent extends Event {
  16. /**
  17. * @since 28.0.0
  18. */
  19. public function __construct(
  20. protected IUser $user,
  21. protected array $data,
  22. ) {
  23. parent::__construct();
  24. }
  25. /**
  26. * @since 28.0.0
  27. */
  28. public function getUser(): IUser {
  29. return $this->user;
  30. }
  31. /**
  32. * @since 28.0.0
  33. */
  34. public function getData(): array {
  35. return $this->data;
  36. }
  37. }