BeforeUserCreatedEvent.php 790 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 OCP\User\Events;
  8. use OCP\EventDispatcher\Event;
  9. /**
  10. * Emitted before a new user is created on the back-end.
  11. *
  12. * @since 18.0.0
  13. */
  14. class BeforeUserCreatedEvent extends Event {
  15. /** @var string */
  16. private $uid;
  17. /** @var string */
  18. private $password;
  19. /**
  20. * @since 18.0.0
  21. */
  22. public function __construct(string $uid,
  23. string $password) {
  24. parent::__construct();
  25. $this->uid = $uid;
  26. $this->password = $password;
  27. }
  28. /**
  29. * @since 18.0.0
  30. */
  31. public function getUid(): string {
  32. return $this->uid;
  33. }
  34. /**
  35. * @since 18.0.0
  36. */
  37. public function getPassword(): string {
  38. return $this->password;
  39. }
  40. }