2019-05-03 09:09:19 -04:00
|
|
|
<?php
|
2021-06-04 15:52:51 -04:00
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
2019-05-03 09:09:19 -04:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2019-05-03 09:09:19 -04:00
|
|
|
*/
|
|
|
|
|
namespace OC\Authentication\Login;
|
|
|
|
|
|
|
|
|
|
use OCP\ISession;
|
|
|
|
|
|
|
|
|
|
class UpdateLastPasswordConfirmCommand extends ALoginCommand {
|
2025-11-17 09:32:54 -05:00
|
|
|
public function __construct(
|
|
|
|
|
private ISession $session,
|
|
|
|
|
) {
|
2019-05-03 09:09:19 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function process(LoginData $loginData): LoginResult {
|
|
|
|
|
$this->session->set(
|
|
|
|
|
'last-password-confirm',
|
|
|
|
|
$loginData->getUser()->getLastLogin()
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
return $this->processNextOrFinishSuccessfully($loginData);
|
|
|
|
|
}
|
|
|
|
|
}
|