ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilUserPasswordResetRequestTargetAdjustmentCase.php
Go to the documentation of this file.
1<?php declare(strict_types=1);
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
8{
12 public function shouldStoreRequestTarget() : bool
13 {
14 return true;
15 }
16
20 public function isInFulfillment() : bool
21 {
22 if (
23 !isset($this->request->getQueryParams()['baseClass']) ||
24 strtolower($this->request->getQueryParams()['baseClass']) !== 'ildashboardgui'
25 ) {
26 return false;
27 }
28
29 return (
30 strtolower($this->ctrl->getCmdClass()) === 'ilpersonalsettingsgui' &&
31 in_array(strtolower($this->ctrl->getCmd()), ['showpassword', 'savepassword'])
32 );
33 }
34
38 public function shouldAdjustRequest() : bool
39 {
40 if (ilSession::get('used_external_auth')) {
41 return false;
42 }
43
44 if (!$this->isInFulfillment() && ($this->user->isPasswordChangeDemanded() || $this->user->isPasswordExpired())) {
45 return true;
46 }
47
48 return false;
49 }
50
54 public function adjust() : void
55 {
56 $this->ctrl->initBaseClass('ildashboardgui');
57 $this->ctrl->redirectByClass(
58 ['ildashboardgui', 'ilpersonalsettingsgui'],
59 'showPassword'
60 );
61 }
62}
user()
Definition: user.php:4
An exception for terminatinating execution or to throw for unit testing.
static get($a_var)
Get a value.
Class ilUserProfileIncompleteAndPasswordResetRequestTargetAdjustmentCase.