Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>pull/18348/head
parent
68d59915d6
commit
d808f9c053
@ -0,0 +1,82 @@ |
||||
<?php declare(strict_types=1); |
||||
|
||||
/** |
||||
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> |
||||
* |
||||
* @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at> |
||||
* |
||||
* @license GNU AGPL version 3 or any later version |
||||
* |
||||
* This program is free software: you can redistribute it and/or modify |
||||
* it under the terms of the GNU Affero General Public License as |
||||
* published by the Free Software Foundation, either version 3 of the |
||||
* License, or (at your option) any later version. |
||||
* |
||||
* This program is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU Affero General Public License for more details. |
||||
* |
||||
* You should have received a copy of the GNU Affero General Public License |
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
*/ |
||||
|
||||
namespace OCP\User\Events; |
||||
|
||||
use OCP\EventDispatcher\Event; |
||||
use OCP\IUser; |
||||
|
||||
/** |
||||
* @since 18.0.0 |
||||
*/ |
||||
class BeforePasswordUpdatedEvent extends Event { |
||||
|
||||
/** @var IUser */ |
||||
private $user; |
||||
|
||||
/** @var string */ |
||||
private $password; |
||||
|
||||
/** @var string|null */ |
||||
private $recoveryPassword; |
||||
|
||||
/** |
||||
* @param IUser $user |
||||
* @param string $password |
||||
* @param string|null $recoveryPassword |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function __construct(IUser $user, |
||||
string $password, |
||||
string $recoveryPassword = null) { |
||||
parent::__construct(); |
||||
$this->user = $user; |
||||
$this->password = $password; |
||||
$this->recoveryPassword = $recoveryPassword; |
||||
} |
||||
|
||||
/** |
||||
* @return IUser |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function getUser(): IUser { |
||||
return $this->user; |
||||
} |
||||
|
||||
/** |
||||
* @return string |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function getPassword(): string { |
||||
return $this->password; |
||||
} |
||||
|
||||
/** |
||||
* @return string|null |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function getRecoveryPassword(): ?string { |
||||
return $this->recoveryPassword; |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,66 @@ |
||||
<?php |
||||
|
||||
declare(strict_types=1); |
||||
|
||||
/** |
||||
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> |
||||
* |
||||
* @author Christoph Wurst <christoph@winzerhof-wurst.at> |
||||
* |
||||
* @license GNU AGPL version 3 or any later version |
||||
* |
||||
* This program is free software: you can redistribute it and/or modify |
||||
* it under the terms of the GNU Affero General Public License as |
||||
* published by the Free Software Foundation, either version 3 of the |
||||
* License, or (at your option) any later version. |
||||
* |
||||
* This program is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU Affero General Public License for more details. |
||||
* |
||||
* You should have received a copy of the GNU Affero General Public License |
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
* |
||||
*/ |
||||
|
||||
namespace OCP\User\Events; |
||||
|
||||
use OCP\EventDispatcher\Event; |
||||
|
||||
/** |
||||
* @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; |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,54 @@ |
||||
<?php declare(strict_types=1); |
||||
|
||||
/** |
||||
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> |
||||
* |
||||
* @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at> |
||||
* |
||||
* @license GNU AGPL version 3 or any later version |
||||
* |
||||
* This program is free software: you can redistribute it and/or modify |
||||
* it under the terms of the GNU Affero General Public License as |
||||
* published by the Free Software Foundation, either version 3 of the |
||||
* License, or (at your option) any later version. |
||||
* |
||||
* This program is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU Affero General Public License for more details. |
||||
* |
||||
* You should have received a copy of the GNU Affero General Public License |
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
*/ |
||||
|
||||
namespace OCP\User\Events; |
||||
|
||||
use OCP\EventDispatcher\Event; |
||||
use OCP\IUser; |
||||
|
||||
/** |
||||
* @since 18.0.0 |
||||
*/ |
||||
class BeforeUserDeletedEvent extends Event { |
||||
|
||||
/** @var IUser */ |
||||
private $user; |
||||
|
||||
/** |
||||
* @param IUser $user |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function __construct(IUser $user) { |
||||
parent::__construct(); |
||||
$this->user = $user; |
||||
} |
||||
|
||||
/** |
||||
* @return IUser |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function getUser(): IUser { |
||||
return $this->user; |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,66 @@ |
||||
<?php |
||||
|
||||
declare(strict_types=1); |
||||
|
||||
/** |
||||
* @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl> |
||||
* |
||||
* @author Roeland Jago Douma <roeland@famdouma.nl> |
||||
* |
||||
* @license GNU AGPL version 3 or any later version |
||||
* |
||||
* This program is free software: you can redistribute it and/or modify |
||||
* it under the terms of the GNU Affero General Public License as |
||||
* published by the Free Software Foundation, either version 3 of the |
||||
* License, or (at your option) any later version. |
||||
* |
||||
* This program is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU Affero General Public License for more details. |
||||
* |
||||
* You should have received a copy of the GNU Affero General Public License |
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
* |
||||
*/ |
||||
|
||||
namespace OCP\User\Events; |
||||
|
||||
use OCP\EventDispatcher\Event; |
||||
use OCP\IUser; |
||||
|
||||
/** |
||||
* @since 18.0.0 |
||||
*/ |
||||
class BeforeUserLoggedInEvent extends Event { |
||||
|
||||
/** @var IUser */ |
||||
private $username; |
||||
|
||||
/** @var string */ |
||||
private $password; |
||||
|
||||
/** |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function __construct(string $username, string $password) { |
||||
parent::__construct(); |
||||
$this->username = $username; |
||||
$this->password = $password; |
||||
} |
||||
|
||||
/** |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function getUsername(): IUser { |
||||
return $this->username; |
||||
} |
||||
|
||||
/** |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function getPassword(): string { |
||||
return $this->password; |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,55 @@ |
||||
<?php |
||||
|
||||
declare(strict_types=1); |
||||
|
||||
/** |
||||
* @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl> |
||||
* |
||||
* @author Roeland Jago Douma <roeland@famdouma.nl> |
||||
* |
||||
* @license GNU AGPL version 3 or any later version |
||||
* |
||||
* This program is free software: you can redistribute it and/or modify |
||||
* it under the terms of the GNU Affero General Public License as |
||||
* published by the Free Software Foundation, either version 3 of the |
||||
* License, or (at your option) any later version. |
||||
* |
||||
* This program is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU Affero General Public License for more details. |
||||
* |
||||
* You should have received a copy of the GNU Affero General Public License |
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
* |
||||
*/ |
||||
|
||||
namespace OCP\User\Events; |
||||
|
||||
use OCP\EventDispatcher\Event; |
||||
use OCP\IUser; |
||||
|
||||
/** |
||||
* @since 18.0.0 |
||||
*/ |
||||
class BeforeUserLoggedInWithCookieEvent extends Event { |
||||
|
||||
/** @var string */ |
||||
private $username; |
||||
|
||||
/** |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function __construct(string $username) { |
||||
parent::__construct(); |
||||
$this->username = $username; |
||||
} |
||||
|
||||
/** |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function getUsername(): string { |
||||
return $this->username; |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,55 @@ |
||||
<?php |
||||
|
||||
declare(strict_types=1); |
||||
|
||||
/** |
||||
* @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl> |
||||
* |
||||
* @author Roeland Jago Douma <roeland@famdouma.nl> |
||||
* |
||||
* @license GNU AGPL version 3 or any later version |
||||
* |
||||
* This program is free software: you can redistribute it and/or modify |
||||
* it under the terms of the GNU Affero General Public License as |
||||
* published by the Free Software Foundation, either version 3 of the |
||||
* License, or (at your option) any later version. |
||||
* |
||||
* This program is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU Affero General Public License for more details. |
||||
* |
||||
* You should have received a copy of the GNU Affero General Public License |
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
* |
||||
*/ |
||||
|
||||
namespace OCP\User\Events; |
||||
|
||||
use OCP\EventDispatcher\Event; |
||||
use OCP\IUser; |
||||
|
||||
/** |
||||
* @since 18.0.0 |
||||
*/ |
||||
class BeforeUserLoggedOutEvent extends Event { |
||||
|
||||
/** @var IUser|null */ |
||||
private $user; |
||||
|
||||
/** |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function __construct(IUser $user = null) { |
||||
parent::__construct(); |
||||
$this->user = $user; |
||||
} |
||||
|
||||
/** |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function getUser(): ?IUser { |
||||
return $this->user; |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,82 @@ |
||||
<?php declare(strict_types=1); |
||||
|
||||
/** |
||||
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> |
||||
* |
||||
* @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at> |
||||
* |
||||
* @license GNU AGPL version 3 or any later version |
||||
* |
||||
* This program is free software: you can redistribute it and/or modify |
||||
* it under the terms of the GNU Affero General Public License as |
||||
* published by the Free Software Foundation, either version 3 of the |
||||
* License, or (at your option) any later version. |
||||
* |
||||
* This program is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU Affero General Public License for more details. |
||||
* |
||||
* You should have received a copy of the GNU Affero General Public License |
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
*/ |
||||
|
||||
namespace OCP\User\Events; |
||||
|
||||
use OCP\EventDispatcher\Event; |
||||
use OCP\IUser; |
||||
|
||||
/** |
||||
* @since 18.0.0 |
||||
*/ |
||||
class PasswordUpdatedEvent extends Event { |
||||
|
||||
/** @var IUser */ |
||||
private $user; |
||||
|
||||
/** @var string */ |
||||
private $password; |
||||
|
||||
/** @var string|null */ |
||||
private $recoveryPassword; |
||||
|
||||
/** |
||||
* @param IUser $user |
||||
* @param string $password |
||||
* @param string|null $recoveryPassword |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function __construct(IUser $user, |
||||
string $password, |
||||
string $recoveryPassword = null) { |
||||
parent::__construct(); |
||||
$this->user = $user; |
||||
$this->password = $password; |
||||
$this->recoveryPassword = $recoveryPassword; |
||||
} |
||||
|
||||
/** |
||||
* @return IUser |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function getUser(): IUser { |
||||
return $this->user; |
||||
} |
||||
|
||||
/** |
||||
* @return string |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function getPassword(): string { |
||||
return $this->password; |
||||
} |
||||
|
||||
/** |
||||
* @return string|null |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function getRecoveryPassword(): ?string { |
||||
return $this->recoveryPassword; |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,93 @@ |
||||
<?php declare(strict_types=1); |
||||
|
||||
/** |
||||
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> |
||||
* |
||||
* @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at> |
||||
* |
||||
* @license GNU AGPL version 3 or any later version |
||||
* |
||||
* This program is free software: you can redistribute it and/or modify |
||||
* it under the terms of the GNU Affero General Public License as |
||||
* published by the Free Software Foundation, either version 3 of the |
||||
* License, or (at your option) any later version. |
||||
* |
||||
* This program is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU Affero General Public License for more details. |
||||
* |
||||
* You should have received a copy of the GNU Affero General Public License |
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
*/ |
||||
|
||||
namespace OCP\User\Events; |
||||
|
||||
use OCP\EventDispatcher\Event; |
||||
use OCP\IUser; |
||||
|
||||
/** |
||||
* @since 18.0.0 |
||||
*/ |
||||
class UserChangedEvent extends Event { |
||||
|
||||
/** @var IUser */ |
||||
private $user; |
||||
|
||||
/** @var string */ |
||||
private $feature; |
||||
|
||||
/** @var mixed */ |
||||
private $value; |
||||
|
||||
/** @var mixed */ |
||||
private $oldValue; |
||||
|
||||
/** |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function __construct(IUser $user, |
||||
string $feature, |
||||
$value, |
||||
$oldValue = null) { |
||||
parent::__construct(); |
||||
$this->user = $user; |
||||
$this->feature = $feature; |
||||
$this->value = $value; |
||||
$this->oldValue = $oldValue; |
||||
} |
||||
|
||||
/** |
||||
* @return IUser |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function getUser(): IUser { |
||||
return $this->user; |
||||
} |
||||
|
||||
/** |
||||
* @return string |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function getFeature(): string { |
||||
return $this->feature; |
||||
} |
||||
|
||||
/** |
||||
* @return mixed |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function getValue() { |
||||
return $this->value; |
||||
} |
||||
|
||||
/** |
||||
* @return mixed |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function getOldValue() { |
||||
return $this->oldValue; |
||||
} |
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,54 @@ |
||||
<?php declare(strict_types=1); |
||||
|
||||
/** |
||||
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> |
||||
* |
||||
* @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at> |
||||
* |
||||
* @license GNU AGPL version 3 or any later version |
||||
* |
||||
* This program is free software: you can redistribute it and/or modify |
||||
* it under the terms of the GNU Affero General Public License as |
||||
* published by the Free Software Foundation, either version 3 of the |
||||
* License, or (at your option) any later version. |
||||
* |
||||
* This program is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU Affero General Public License for more details. |
||||
* |
||||
* You should have received a copy of the GNU Affero General Public License |
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
*/ |
||||
|
||||
namespace OCP\User\Events; |
||||
|
||||
use OCP\EventDispatcher\Event; |
||||
use OCP\IUser; |
||||
|
||||
/** |
||||
* @since 18.0.0 |
||||
*/ |
||||
class UserDeletedEvent extends Event { |
||||
|
||||
/** @var IUser */ |
||||
private $user; |
||||
|
||||
/** |
||||
* @param IUser $user |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function __construct(IUser $user) { |
||||
parent::__construct(); |
||||
$this->user = $user; |
||||
} |
||||
|
||||
/** |
||||
* @return IUser |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function getUser(): IUser { |
||||
return $this->user; |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,77 @@ |
||||
<?php |
||||
|
||||
declare(strict_types=1); |
||||
|
||||
/** |
||||
* @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl> |
||||
* |
||||
* @author Christoph Wurst <christoph@winzerhof-wurst.at> |
||||
* @author Roeland Jago Douma <roeland@famdouma.nl> |
||||
* |
||||
* @license GNU AGPL version 3 or any later version |
||||
* |
||||
* This program is free software: you can redistribute it and/or modify |
||||
* it under the terms of the GNU Affero General Public License as |
||||
* published by the Free Software Foundation, either version 3 of the |
||||
* License, or (at your option) any later version. |
||||
* |
||||
* This program is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU Affero General Public License for more details. |
||||
* |
||||
* You should have received a copy of the GNU Affero General Public License |
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
* |
||||
*/ |
||||
|
||||
namespace OCP\User\Events; |
||||
|
||||
use OCP\EventDispatcher\Event; |
||||
use OCP\IUser; |
||||
|
||||
/** |
||||
* @since 18.0.0 |
||||
*/ |
||||
class UserLoggedInEvent extends Event { |
||||
|
||||
/** @var IUser */ |
||||
private $user; |
||||
|
||||
/** @var string */ |
||||
private $password; |
||||
|
||||
/** @var bool */ |
||||
private $isTokenLogin; |
||||
|
||||
/** |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function __construct(IUser $user, string $password, bool $isTokenLogin) { |
||||
parent::__construct(); |
||||
$this->user = $user; |
||||
$this->password = $password; |
||||
$this->isTokenLogin = $isTokenLogin; |
||||
} |
||||
|
||||
/** |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function getUser(): IUser { |
||||
return $this->user; |
||||
} |
||||
|
||||
/** |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function getPassword(): string { |
||||
return $this->password; |
||||
} |
||||
|
||||
/** |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function isTokenLogin(): bool { |
||||
return $this->isTokenLogin; |
||||
} |
||||
} |
||||
@ -0,0 +1,66 @@ |
||||
<?php |
||||
|
||||
declare(strict_types=1); |
||||
|
||||
/** |
||||
* @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl> |
||||
* |
||||
* @author Roeland Jago Douma <roeland@famdouma.nl> |
||||
* |
||||
* @license GNU AGPL version 3 or any later version |
||||
* |
||||
* This program is free software: you can redistribute it and/or modify |
||||
* it under the terms of the GNU Affero General Public License as |
||||
* published by the Free Software Foundation, either version 3 of the |
||||
* License, or (at your option) any later version. |
||||
* |
||||
* This program is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU Affero General Public License for more details. |
||||
* |
||||
* You should have received a copy of the GNU Affero General Public License |
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
* |
||||
*/ |
||||
|
||||
namespace OCP\User\Events; |
||||
|
||||
use OCP\EventDispatcher\Event; |
||||
use OCP\IUser; |
||||
|
||||
/** |
||||
* @since 18.0.0 |
||||
*/ |
||||
class UserLoggedInWithCookieEvent extends Event { |
||||
|
||||
/** @var IUser */ |
||||
private $user; |
||||
|
||||
/** @var string|null */ |
||||
private $password; |
||||
|
||||
/** |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function __construct(IUser $user, ?string $password) { |
||||
parent::__construct(); |
||||
$this->user = $user; |
||||
$this->password = $password; |
||||
} |
||||
|
||||
/** |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function getUser(): IUser { |
||||
return $this->user; |
||||
} |
||||
|
||||
/** |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function getPassword(): ?string { |
||||
return $this->password; |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,55 @@ |
||||
<?php |
||||
|
||||
declare(strict_types=1); |
||||
|
||||
/** |
||||
* @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl> |
||||
* |
||||
* @author Roeland Jago Douma <roeland@famdouma.nl> |
||||
* |
||||
* @license GNU AGPL version 3 or any later version |
||||
* |
||||
* This program is free software: you can redistribute it and/or modify |
||||
* it under the terms of the GNU Affero General Public License as |
||||
* published by the Free Software Foundation, either version 3 of the |
||||
* License, or (at your option) any later version. |
||||
* |
||||
* This program is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU Affero General Public License for more details. |
||||
* |
||||
* You should have received a copy of the GNU Affero General Public License |
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
* |
||||
*/ |
||||
|
||||
namespace OCP\User\Events; |
||||
|
||||
use OCP\EventDispatcher\Event; |
||||
use OCP\IUser; |
||||
|
||||
/** |
||||
* @since 18.0.0 |
||||
*/ |
||||
class UserLoggedOutEvent extends Event { |
||||
|
||||
/** @var IUser|null */ |
||||
private $user; |
||||
|
||||
/** |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function __construct(IUser $user = null) { |
||||
parent::__construct(); |
||||
$this->user = $user; |
||||
} |
||||
|
||||
/** |
||||
* @since 18.0.0 |
||||
*/ |
||||
public function getUser(): ?IUser { |
||||
return $this->user; |
||||
} |
||||
|
||||
} |
||||
Loading…
Reference in new issue