ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilUserProfileIncompleteRequestTargetAdjustmentCase.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 require_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()) == 'ilpersonalprofilegui' &&
31  in_array(strtolower($this->ctrl->getCmd()), array('savepersonaldata', 'showpersonaldata', 'showprofile'))
32  );
33  }
34 
38  public function shouldAdjustRequest()
39  {
40  if(!$this->isInFulfillment() && $this->user->getProfileIncomplete())
41  {
42  return true;
43  }
44 
45  return false;
46  }
47 
51  public function adjust()
52  {
53  if(isset($_GET['baseClass']) && strtolower($_GET['baseClass']) == 'ilpersonaldesktopgui')
54  {
55  $this->ctrl->setTargetScript('ilias.php');
56  ilUtil::redirect($this->ctrl->getLinkTargetByClass(array('ilpersonaldesktopgui', 'ilpersonalprofilegui'), 'showPersonalData', '', false, false));
57  }
58  else
59  {
60  ilUtil::redirect('ilias.php?baseClass=ilPersonalDesktopGUI');
61  }
62  }
63 }