ILIAS
release_10 Revision v10.1-43-ga1241a92c2f
◀ ilDoc Overview
class.ilForcedUserPasswordChangeStartUpStep.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
use
Psr\Http\Message\ServerRequestInterface
;
22
use
ILIAS\Init\StartupSequence\StartUpSequenceStep
;
23
24
class
ilForcedUserPasswordChangeStartUpStep
extends
StartUpSequenceStep
25
{
26
private
ilObjUser
$user
;
27
private
ilCtrl
$ctrl
;
28
private
ServerRequestInterface
$request
;
29
30
public
function
__construct
(
31
ilObjUser
$user,
32
ilCtrl
$ctrl,
33
ServerRequestInterface
$request
34
) {
35
$this->
user
=
$user
;
36
$this->
ctrl
=
$ctrl
;
37
$this->request =
$request
;
38
}
39
40
public
function
shouldStoreRequestTarget
(): bool
41
{
42
return
true
;
43
}
44
45
public
function
isInFulfillment
(): bool
46
{
47
if
(
48
!isset($this->request->getQueryParams()[
'baseClass'
]) ||
49
strtolower($this->request->getQueryParams()[
'baseClass'
]) !== strtolower(ilDashboardGUI::class)
50
) {
51
return
false
;
52
}
53
54
return
55
(
56
strtolower($this->
ctrl
->getCmdClass()) === strtolower(ilLocalUserPasswordSettingsGUI::class)
57
) &&
58
in_array(
59
$this->
ctrl
->getCmd(),
60
[
61
ilLocalUserPasswordSettingsGUI::CMD_SAVE_PASSWORD
,
62
ilLocalUserPasswordSettingsGUI::CMD_SHOW_PASSWORD
63
],
64
true
65
)
66
;
67
}
68
69
public
function
shouldInterceptRequest
(): bool
70
{
71
if
(
ilSession::get
(
'used_external_auth_mode'
)) {
72
return
false
;
73
}
74
75
if
(!$this->
isInFulfillment
() && ($this->
user
->isPasswordChangeDemanded() || $this->
user
->isPasswordExpired(
76
))) {
77
return
true
;
78
}
79
80
return
false
;
81
}
82
83
public
function
execute
(): void
84
{
85
$this->
ctrl
->redirectToURL(
86
$this->
ctrl
->getLinkTargetByClass(
87
[
88
ilDashboardGUI::class,
89
ilPersonalSettingsGUI::class,
90
ilLocalUserPasswordSettingsGUI::class
91
],
92
ilLocalUserPasswordSettingsGUI::CMD_SHOW_PASSWORD
93
)
94
);
95
}
96
}
ilSession\get
static get(string $a_var)
Definition:
class.ilSession.php:401
ilLocalUserPasswordSettingsGUI\CMD_SAVE_PASSWORD
const CMD_SAVE_PASSWORD
Definition:
class.ilLocalUserPasswordSettingsGUI.php:36
StartUpSequenceStep
ilForcedUserPasswordChangeStartUpStep\shouldStoreRequestTarget
shouldStoreRequestTarget()
Definition:
class.ilForcedUserPasswordChangeStartUpStep.php:40
ilForcedUserPasswordChangeStartUpStep\isInFulfillment
isInFulfillment()
Definition:
class.ilForcedUserPasswordChangeStartUpStep.php:45
ILIAS\Repository\user
user()
Definition:
trait.GlobalDICDomainServices.php:66
ServerRequestInterface
ILIAS\Repository\ctrl
ctrl()
Definition:
trait.GlobalDICGUIServices.php:63
ilForcedUserPasswordChangeStartUpStep\__construct
__construct(ilObjUser $user, ilCtrl $ctrl, ServerRequestInterface $request)
Definition:
class.ilForcedUserPasswordChangeStartUpStep.php:30
ilObjUser
ilForcedUserPasswordChangeStartUpStep\execute
execute()
Definition:
class.ilForcedUserPasswordChangeStartUpStep.php:83
ilForcedUserPasswordChangeStartUpStep\$ctrl
ilCtrl $ctrl
Definition:
class.ilForcedUserPasswordChangeStartUpStep.php:27
ILIAS\Init\StartupSequence\StartUpSequenceStep
Definition:
StartUpSequenceStep.php:28
ilForcedUserPasswordChangeStartUpStep\shouldInterceptRequest
shouldInterceptRequest()
Definition:
class.ilForcedUserPasswordChangeStartUpStep.php:69
ilLocalUserPasswordSettingsGUI\CMD_SHOW_PASSWORD
const CMD_SHOW_PASSWORD
Definition:
class.ilLocalUserPasswordSettingsGUI.php:35
ilForcedUserPasswordChangeStartUpStep
ilForcedUserPasswordChangeStartUpStep\$user
ilObjUser $user
Definition:
class.ilForcedUserPasswordChangeStartUpStep.php:26
ilForcedUserPasswordChangeStartUpStep\$request
ServerRequestInterface $request
Definition:
class.ilForcedUserPasswordChangeStartUpStep.php:28
ilCtrl
components
ILIAS
Authentication
classes
class.ilForcedUserPasswordChangeStartUpStep.php
Generated on Wed Sep 10 2025 15:14:52 for ILIAS by
1.8.13 (using
Doxyfile
)