4 require_once
'Services/User/classes/class.ilUserRequestTargetAdjustmentCase.php';
29 if (!isset(
$_GET[
'baseClass']) || strtolower(
$_GET[
'baseClass']) !=
'ilpersonaldesktopgui') {
34 strtolower($this->ctrl->getCmdClass()) ==
'ilpersonalprofilegui' &&
35 in_array(strtolower($this->ctrl->getCmd()), array(
52 $prompt_settings = $user_prompt_service->data()->getSettings();
53 $user_prompt = $user_prompt_service->data()->getUserPrompt($this->
user->getId());
55 $user_log->debug(
"Check Profile");
59 if ($this->
user->getProfileIncomplete()) {
60 $user_log->debug(
"Is Incomplete");
64 if (!in_array($this->
user->getPref(
"public_profile"), array(
"y",
"g"))) {
65 $user_log->debug(
"Is not public");
68 $user_log->debug(
"Mode: X days after login");
70 if ($user_prompt->getFirstLogin() !=
"" && $user_prompt->getLastPrompt() ==
"") {
71 $user_log->debug(
"User has logged in and not prompted yet");
78 $user_log->debug(
"Deadline is due");
79 $this->update_prompt =
true;
87 $user_log->debug(
"Mode: Repeat all x days");
89 $deadline = max($user_prompt->getFirstLogin(), $user_prompt->getLastPrompt());
90 if ($deadline !=
"") {
91 $user_log->debug(
"User logged in already.");
93 $deadline->increment(
IL_CAL_DAY, (
int) $prompt_settings->getDays());
97 $user_log->debug(
"Deadline is due");
98 $this->update_prompt =
true;
116 if ($this->update_prompt) {
117 $user_log->debug(
"Update last prompt date for user :" . $this->
user->getId());
119 $user_prompt_service->data()->saveLastUserPrompt((
int) $this->
user->getId());
122 $_GET[
'baseClass'] =
'ilpersonaldesktopgui';
124 $this->ctrl->setTargetScript(
'ilias.php');
125 $this->ctrl->setParameterByClass(
"ilpersonalprofilegui",
"prompted",
"1");
126 ilUtil::redirect($this->ctrl->getLinkTargetByClass(array(
'ilpersonaldesktopgui',
'ilpersonalprofilegui'),
'showPersonalData',
'',
false,
false));
User profile prompt subservice.
shouldStoreRequestTarget()
Class ilUserProfileIncompleteRequestTargetAdjustmentCase.
Class ilUserRequestTargetAdjustmentCase.
static now()
Return current timestamp in Y-m-d H:i:s format.
increment($a_type, $a_count=1)
increment
const MODE_ONCE_AFTER_LOGIN
static getLogger($a_component_id)
Get component logger.
static redirect($a_script)