RegistryEvent.php 1002 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCP\Authentication\TwoFactorAuth;
  8. use OCP\EventDispatcher\Event;
  9. use OCP\IUser;
  10. /**
  11. * @since 15.0.0
  12. * @deprecated 28.0.0 Use TwoFactorProviderForUserRegistered or TwoFactorProviderForUserUnregistered instead
  13. * @see \OCP\Authentication\TwoFactorAuth\TwoFactorProviderForUserRegistered
  14. * @see \OCP\Authentication\TwoFactorAuth\TwoFactorProviderForUserUnregistered
  15. */
  16. class RegistryEvent extends Event {
  17. private IProvider $provider;
  18. private IUser $user;
  19. /**
  20. * @since 15.0.0
  21. */
  22. public function __construct(IProvider $provider, IUser $user) {
  23. parent::__construct();
  24. $this->provider = $provider;
  25. $this->user = $user;
  26. }
  27. /**
  28. * @since 15.0.0
  29. */
  30. public function getProvider(): IProvider {
  31. return $this->provider;
  32. }
  33. /**
  34. * @since 15.0.0
  35. */
  36. public function getUser(): IUser {
  37. return $this->user;
  38. }
  39. }