BeforeUserRemovedEvent.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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\Group\Events;
  8. use OCP\EventDispatcher\Event;
  9. use OCP\IGroup;
  10. use OCP\IUser;
  11. /**
  12. * @since 18.0.0
  13. * @deprecated 20.0.0 - it can't be guaranteed that this event is triggered in
  14. * all case (e.g. for LDAP users this isn't possible) - if there is a valid use
  15. * case please reach out in the issue tracker at
  16. * https://github.com/nextcloud/server/issues
  17. */
  18. class BeforeUserRemovedEvent extends Event {
  19. /** @var IGroup */
  20. private $group;
  21. /*** @var IUser */
  22. private $user;
  23. /**
  24. * @since 18.0.0
  25. * @deprecated 20.0.0
  26. */
  27. public function __construct(IGroup $group, IUser $user) {
  28. parent::__construct();
  29. $this->group = $group;
  30. $this->user = $user;
  31. }
  32. /**
  33. * @return IGroup
  34. * @since 18.0.0
  35. * @deprecated 20.0.0
  36. */
  37. public function getGroup(): IGroup {
  38. return $this->group;
  39. }
  40. /**
  41. * @return IUser
  42. * @since 18.0.0
  43. * @deprecated 20.0.0
  44. */
  45. public function getUser(): IUser {
  46. return $this->user;
  47. }
  48. }