ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilUserPasswordResetRequestTargetAdjustmentCase.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once 'Services/User/classes/class.ilUserRequestTargetAdjustmentCase.php';
5
10{
14 public function shouldStoreRequestTarget()
15 {
16 return true;
17 }
18
22 public function isInFulfillment()
23 {
24 if(!isset($_GET['baseClass']) || strtolower($_GET['baseClass']) != 'ilpersonaldesktopgui')
25 {
26 return false;
27 }
28
29 return (
30 strtolower($this->ctrl->getCmdClass()) == 'ilpersonalsettingsgui' &&
31 in_array(strtolower($this->ctrl->getCmd()), array('showpassword', 'savepassword'))
32 );
33 }
34
38 public function shouldAdjustRequest()
39 {
40 if(ilSession::get('used_external_auth'))
41 {
42 return false;
43 }
44
45 if(!$this->isInFulfillment() && ($this->user->isPasswordChangeDemanded() || $this->user->isPasswordExpired()))
46 {
47 return true;
48 }
49
50 return false;
51 }
52
56 public function adjust()
57 {
58 $_GET['baseClass'] = 'ilpersonaldesktopgui';
59 $this->ctrl->setTargetScript('ilias.php');
60 ilUtil::redirect($this->ctrl->getLinkTargetByClass(array('ilpersonaldesktopgui', 'ilpersonalsettingsgui'), 'showPassword', '', false, false));
61 }
62}
user()
Definition: user.php:4
$_GET["client_id"]
An exception for terminatinating execution or to throw for unit testing.
static get($a_var)
Get a value.
Class ilUserProfileIncompleteAndPasswordResetRequestTargetAdjustmentCase.
Class ilUserRequestTargetAdjustmentCase.
static redirect($a_script)
http redirect to other script