Files
nextcloud-server-mirror/lib/public/User/Events/UserLoggedInEvent.php
Côme Chilliet 58e5e69153 chore: Flag PostLoginEvent as deprecated, because UserLoggedInEvent is the same
UserLoggedInEvent is the correct naming, matching BeforeUserLoggedInEvent

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-09-21 11:10:47 +02:00

66 lines
999 B
PHP

<?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;
use OCP\IUser;
/**
* @since 18.0.0
*/
class UserLoggedInEvent extends Event {
/**
* @since 18.0.0
*/
public function __construct(
private IUser $user,
private string $loginName,
private ?string $password,
private bool $isTokenLogin,
) {
parent::__construct();
}
/**
* @since 18.0.0
*/
public function getUser(): IUser {
return $this->user;
}
/**
* @since 31.0.0
*/
public function getUid(): string {
return $this->user->getUID();
}
/**
* @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;
}
}