migrate therinaldos.com data
Build & Deploy to DigitalOcean Space / build (push) Failing after 2m38s

This commit is contained in:
2024-05-05 15:50:45 -04:00
commit ef1ff240d4
23182 changed files with 3801898 additions and 0 deletions
@@ -0,0 +1,85 @@
<?php
declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
*
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
* @author Morris Jobke <hey@morrisjobke.de>
*
* @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;
/**
* Emitted before the user password is updated.
*
* @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>
* @author Morris Jobke <hey@morrisjobke.de>
*
* @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;
/**
* 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;
}
}
@@ -0,0 +1,54 @@
<?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;
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,78 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl>
*
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
* @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\Authentication\IApacheBackend;
use OCP\EventDispatcher\Event;
/**
* @since 18.0.0
*/
class BeforeUserLoggedInEvent extends Event {
private string $username;
private ?string $password;
private ?IApacheBackend $backend;
/**
* @since 18.0.0
* @since 26.0.0 password can be null
*/
public function __construct(string $username, ?string $password, ?IApacheBackend $backend = null) {
parent::__construct();
$this->username = $username;
$this->password = $password;
$this->backend = $backend;
}
/**
* returns the login name, which must not necessarily match to a user ID
*
* @since 18.0.0
*/
public function getUsername(): string {
return $this->username;
}
/**
* @since 18.0.0
* @since 26.0.0 value can be null
*/
public function getPassword(): ?string {
return $this->password;
}
/**
* return backend if available (or null)
*
* @return IApacheBackend|null
* @since 26.0.0
*/
public function getBackend(): ?IApacheBackend {
return $this->backend;
}
}
@@ -0,0 +1,54 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl>
*
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
* @author Morris Jobke <hey@morrisjobke.de>
*
* @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;
/**
* Emitted before a user is logged in via remember-me cookies.
*
* @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 Christoph Wurst <christoph@winzerhof-wurst.at>
* @author Morris Jobke <hey@morrisjobke.de>
*
* @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;
/**
* Emitted before a user is logged out.
*
* @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,50 @@
<?php
declare(strict_types=1);
/*
* @copyright 2023 Christoph Wurst <christoph@winzerhof-wurst.at>
*
* @author 2023 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\User\IOutOfOfficeData;
/**
* Emitted when a user's out-of-office period has changed
*
* @since 28.0.0
*/
class OutOfOfficeChangedEvent extends Event {
/**
* @since 28.0.0
*/
public function __construct(private IOutOfOfficeData $data) {
parent::__construct();
}
/**
* @since 28.0.0
*/
public function getData(): IOutOfOfficeData {
return $this->data;
}
}
@@ -0,0 +1,50 @@
<?php
declare(strict_types=1);
/*
* @copyright 2023 Christoph Wurst <christoph@winzerhof-wurst.at>
*
* @author 2023 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\User\IOutOfOfficeData;
/**
* Emitted when a user's out-of-office period is cleared
*
* @since 28.0.0
*/
class OutOfOfficeClearedEvent extends Event {
/**
* @since 28.0.0
*/
public function __construct(private IOutOfOfficeData $data) {
parent::__construct();
}
/**
* @since 28.0.0
*/
public function getData(): IOutOfOfficeData {
return $this->data;
}
}
@@ -0,0 +1,51 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2023 Richard Steinmetz <richard@steinmetz.cloud>
*
* @author Richard Steinmetz <richard@steinmetz.cloud>
*
* @license AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU 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 General Public License for more details.
*
* You should have received a copy of the GNU 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\User\IOutOfOfficeData;
/**
* Emitted when a user's out-of-office period ended
*
* @since 28.0.0
*/
class OutOfOfficeEndedEvent extends Event {
/**
* @since 28.0.0
*/
public function __construct(private IOutOfOfficeData $data) {
parent::__construct();
}
/**
* @since 28.0.0
*/
public function getData(): IOutOfOfficeData {
return $this->data;
}
}
@@ -0,0 +1,50 @@
<?php
declare(strict_types=1);
/*
* @copyright 2023 Christoph Wurst <christoph@winzerhof-wurst.at>
*
* @author 2023 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\User\IOutOfOfficeData;
/**
* Emitted when a user's out-of-office period is scheduled
*
* @since 28.0.0
*/
class OutOfOfficeScheduledEvent extends Event {
/**
* @since 28.0.0
*/
public function __construct(private IOutOfOfficeData $data) {
parent::__construct();
}
/**
* @since 28.0.0
*/
public function getData(): IOutOfOfficeData {
return $this->data;
}
}
@@ -0,0 +1,51 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2023 Richard Steinmetz <richard@steinmetz.cloud>
*
* @author Richard Steinmetz <richard@steinmetz.cloud>
*
* @license AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU 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 General Public License for more details.
*
* You should have received a copy of the GNU 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\User\IOutOfOfficeData;
/**
* Emitted when a user's out-of-office period started
*
* @since 28.0.0
*/
class OutOfOfficeStartedEvent extends Event {
/**
* @since 28.0.0
*/
public function __construct(private IOutOfOfficeData $data) {
parent::__construct();
}
/**
* @since 28.0.0
*/
public function getData(): IOutOfOfficeData {
return $this->data;
}
}
@@ -0,0 +1,85 @@
<?php
declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
*
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
* @author Morris Jobke <hey@morrisjobke.de>
*
* @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;
/**
* Emitted when the user password has been updated.
*
* @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,90 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl>
*
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
* @author Lionel Elie Mamane <lionel@mamane.lu>
* @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 PostLoginEvent extends Event {
/** @var IUser */
private $user;
/**
* @since 20.0.0
* @var string
*/
private $loginName;
/** @var string */
private $password;
/** @var bool */
private $isTokenLogin;
/**
* @since 18.0.0
*/
public function __construct(IUser $user, string $loginName, string $password, bool $isTokenLogin) {
parent::__construct();
$this->user = $user;
$this->loginName = $loginName;
$this->password = $password;
$this->isTokenLogin = $isTokenLogin;
}
/**
* @since 18.0.0
*/
public function getUser(): IUser {
return $this->user;
}
/**
* @since 20.0.0
*/
public function getLoginName(): string {
return $this->loginName;
}
/**
* @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,87 @@
<?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;
use OCP\IUser;
/**
* @since 18.0.0
*/
class UserChangedEvent extends Event {
private IUser $user;
private string $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,74 @@
<?php
declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
*
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
* @author Morris Jobke <hey@morrisjobke.de>
*
* @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;
/**
* Emitted when a new user has been created on the back-end.
*
* @since 18.0.0
*/
class UserCreatedEvent extends Event {
/** @var IUser */
private $user;
/** @var string */
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 getUid(): string {
return $this->user->getUID();
}
/**
* @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 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,50 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2023 Joas Schilling <coding@schilljs.com>
*
* @author Joas Schilling <coding@schilljs.com>
*
* @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 28.0.0
*/
class UserFirstTimeLoggedInEvent extends Event {
/**
* @since 28.0.0
*/
public function __construct(
private IUser $user,
) {
parent::__construct();
}
/**
* @since 28.0.0
*/
public function getUser(): IUser {
return $this->user;
}
}
@@ -0,0 +1,109 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2020, Georg Ehrke
*
* @author Georg Ehrke <oc.list@georgehrke.com>
*
* @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;
use OCP\UserStatus\IUserStatus;
/**
* @since 20.0.0
*/
class UserLiveStatusEvent extends Event {
/**
* @var string
* @since 20.0.0
*/
public const STATUS_ONLINE = 'online';
/**
* @var string
* @since 20.0.0
*/
public const STATUS_AWAY = 'away';
/**
* @var string
* @since 20.0.0
*/
public const STATUS_OFFLINE = 'offline';
private IUser $user;
private string $status;
private int $timestamp;
private ?IUserStatus $userStatus = null;
/**
* @since 20.0.0
*/
public function __construct(IUser $user,
string $status,
int $timestamp) {
parent::__construct();
$this->user = $user;
$this->status = $status;
$this->timestamp = $timestamp;
}
/**
* @return IUser
* @since 20.0.0
*/
public function getUser(): IUser {
return $this->user;
}
/**
* @return string
* @since 20.0.0
*/
public function getStatus(): string {
return $this->status;
}
/**
* @return int
* @since 20.0.0
*/
public function getTimestamp(): int {
return $this->timestamp;
}
/**
* Get the user status that might be available after processing the event
* @since 24.0.0
*/
public function getUserStatus(): ?IUserStatus {
return $this->userStatus;
}
/**
* @since 24.0.0
*/
public function setUserStatus(IUserStatus $userStatus) {
$this->userStatus = $userStatus;
}
}
@@ -0,0 +1,86 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl>
*
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
* @author Joas Schilling <coding@schilljs.com>
*
* @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|null */
private $password;
/** @var bool */
private $isTokenLogin;
/** @var string */
private $loginName;
/**
* @since 18.0.0
*/
public function __construct(IUser $user, string $loginName, ?string $password, bool $isTokenLogin) {
parent::__construct();
$this->user = $user;
$this->password = $password;
$this->isTokenLogin = $isTokenLogin;
$this->loginName = $loginName;
}
/**
* @since 18.0.0
*/
public function getUser(): IUser {
return $this->user;
}
/**
* @since 21.0.0
*/
public function getLoginName(): string {
return $this->loginName;
}
/**
* @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 Christoph Wurst <christoph@winzerhof-wurst.at>
* @author Morris Jobke <hey@morrisjobke.de>
*
* @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;
/**
* Emitted when a user has been successfully logged in via remember-me cookies.
*
* @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 Christoph Wurst <christoph@winzerhof-wurst.at>
* @author Morris Jobke <hey@morrisjobke.de>
*
* @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;
/**
* Emitted when a user has been logged out successfully.
*
* @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;
}
}