diff options
Diffstat (limited to 'lib/public/User/Events/BeforeUserCreatedEvent.php')
-rw-r--r-- | lib/public/User/Events/BeforeUserCreatedEvent.php | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/lib/public/User/Events/BeforeUserCreatedEvent.php b/lib/public/User/Events/BeforeUserCreatedEvent.php new file mode 100644 index 00000000000..62ee32003ce --- /dev/null +++ b/lib/public/User/Events/BeforeUserCreatedEvent.php @@ -0,0 +1,48 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCP\User\Events; + +use OCP\EventDispatcher\Event; + +/** + * Emitted before a new user is created on the back-end. + * + * @since 18.0.0 + */ +class BeforeUserCreatedEvent extends Event { + /** @var string */ + private $uid; + + /** @var string */ + private $password; + + /** + * @since 18.0.0 + */ + public function __construct(string $uid, + string $password) { + parent::__construct(); + $this->uid = $uid; + $this->password = $password; + } + + /** + * @since 18.0.0 + */ + public function getUid(): string { + return $this->uid; + } + + /** + * @since 18.0.0 + */ + public function getPassword(): string { + return $this->password; + } +} |