4 require_once
"./Services/Object/classes/class.ilObjectGUI.php";
46 function __construct($a_data,$a_id,$a_call_by_reference =
false, $a_prepare_output =
true)
50 define(
'USER_FOLDER_ID',7);
53 parent::__construct($a_data,$a_id,$a_call_by_reference,
false);
57 $this->ctrl->saveParameter($this,
array(
'obj_id',
'letter'));
58 $this->ctrl->setParameterByClass(
"ilobjuserfoldergui",
"letter",
$_GET[
"letter"]);
60 $lng->loadLanguageModule(
'user');
64 $this->gender =
array(
65 'm' =>
"salutation_m",
74 $next_class = $this->ctrl->getNextClass($this);
75 $cmd = $this->ctrl->getCmd();
81 case "illearningprogressgui":
82 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
84 $this->ctrl->forwardCommand($new_gui);
87 case "ilobjectownershipmanagementgui":
88 include_once(
"Services/Object/classes/class.ilObjectOwnershipManagementGUI.php");
90 $this->ctrl->forwardCommand($gui);
99 $return = $this->
$cmd();
110 if(strtolower(get_class($this->
object)) ==
'ilobjuser')
112 $this->tpl->setTitle(
'['.$this->
object->getLogin().
'] '.$this->
object->getTitle());
113 $this->tpl->setDescription($this->
object->getLongDescription());
118 parent::setTitleAndDescription();
128 if(strtolower(
$_GET[
"baseClass"]) ==
'iladministrationgui')
130 $this->ctrl->redirectByClass(
"ilobjuserfoldergui",
"view");
136 $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
153 global $rbacsystem, $ilHelp;
155 $this->tabs_gui->clearTargets();
157 $ilHelp->setScreenIdComponent(
"usr");
161 $this->tabs_gui->setBackTarget(
162 $this->lng->txt(
"search_results"),
$_SESSION[
"usr_search_link"]);
164 $this->tabs_gui->addTarget(
"properties",
165 $this->ctrl->getLinkTarget($this,
"edit"),
array(
"edit",
"",
"view"), get_class($this),
"",
true);
169 $this->tabs_gui->addTarget(
"properties",
170 $this->ctrl->getLinkTarget($this,
"edit"),
array(
"edit",
"",
"view"), get_class($this));
173 $this->tabs_gui->addTarget(
"role_assignment",
174 $this->ctrl->getLinkTarget($this,
"roleassignment"),
array(
"roleassignment"), get_class($this));
177 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
178 if($rbacsystem->checkAccess(
'read',$this->ref_id)
and 183 $this->tabs_gui->addTarget(
'learning_progress',
184 $this->ctrl->getLinkTargetByClass(
'illearningprogressgui',
''),
186 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui'));
189 $this->tabs_gui->addTarget(
'user_ownership',
190 $this->ctrl->getLinkTargetByClass(
'ilobjectownershipmanagementgui',
''),
192 'ilobjectownershipmanagementgui');
200 $this->back_target =
array(
"text" => $a_text,
210 include_once
'./Services/User/classes/class.ilUserDefinedFields.php';
213 foreach($this->user_defined_fields->getDefinitions() as $field_id => $definition)
215 if($definition[
'required']
and !strlen(
$_POST[
'udf'][$field_id]))
226 include_once
'./Services/User/classes/class.ilUserDefinedFields.php';
229 if($this->
object->getType() ==
'usr')
231 $user_defined_data = $this->
object->getUserDefinedData();
233 foreach($this->user_defined_fields->getDefinitions() as $field_id => $definition)
235 $old = isset(
$_SESSION[
"error_post_vars"][
"udf"][$field_id]) ?
236 $_SESSION[
"error_post_vars"][
"udf"][$field_id] : $user_defined_data[$field_id];
240 $this->tpl->setCurrentBlock(
"field_text");
241 $this->tpl->setVariable(
"FIELD_NAME",
'udf['.$definition[
'field_id'].
']');
243 $this->tpl->parseCurrentBlock();
247 $this->tpl->setCurrentBlock(
"field_select");
249 'udf['.$definition[
'field_id'].
']',
250 $this->user_defined_fields->fieldValuesToSelectArray(
251 $definition[
'field_values']),
254 $this->tpl->parseCurrentBlock();
256 $this->tpl->setCurrentBlock(
"user_defined");
258 if($definition[
'required'])
260 $name = $definition[
'field_name'].
"<span class=\"asterisk\">*</span>";
264 $name = $definition[
'field_name'];
266 $this->tpl->setVariable(
"TXT_FIELD_NAME",$name);
267 $this->tpl->parseCurrentBlock();
278 $this->tabs_gui->clearTargets();
282 $obj_list = $rbacreview->getRoleListByObject(ROLE_FOLDER_ID);
284 foreach ($obj_list as $obj_data)
287 if($this->
object->getRefId() !=
USER_FOLDER_ID and !in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId())))
289 include_once
'./Services/AccessControl/classes/class.ilObjRole.php';
297 if ($obj_data[
"obj_id"] != ANONYMOUS_ROLE_ID)
300 if ($obj_data[
"obj_id"] != SYSTEM_ROLE_ID
or in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId())))
302 $rol[$obj_data[
"obj_id"]] = $obj_data[
"title"];
310 $this->
ilias->raiseError($this->lng->txt(
"msg_no_roles_users_can_be_assigned_to"),$this->
ilias->error_obj->MESSAGE);
313 $keys = array_keys($rol);
316 if (in_array(4,$keys))
318 $this->default_role = 4;
322 if (count($keys) > 1
and in_array(2,$keys))
325 foreach ($keys as $key => $val)
335 $this->default_role = array_shift($keys);
337 $this->selectable_roles = $rol;
347 if (!$rbacsystem->checkAccess(
'create_usr', $this->usrf_ref_id)
and 348 !$rbacsystem->checkAccess(
'cat_administrate_users',$this->usrf_ref_id))
350 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->
ilias->error_obj->MESSAGE);
354 $this->initForm(
"create");
355 return $tpl->setContent($this->form_gui->getHtml());
366 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
369 if (!$rbacsystem->checkAccess(
'create_usr', $this->usrf_ref_id) &&
370 !$ilAccess->checkAccess(
'cat_administrate_users',
"", $this->usrf_ref_id))
372 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->
ilias->error_obj->MESSAGE);
376 $this->initForm(
"create");
379 $profileMaybeIncomplete =
false;
380 if($this->form_gui->getInput(
'ignore_rf',
false))
385 if ($this->form_gui->checkInput())
392 $userObj->setPasswd($this->form_gui->getInput(
'passwd'),
IL_PASSWD_PLAIN);
393 $userObj->setTitle($userObj->getFullname());
394 $userObj->setDescription($userObj->getEmail());
397 foreach(
$_POST as $k => $v)
399 if (substr($k, 0, 4) ==
"udf_")
401 $udf[substr($k, 4)] = $v;
404 $userObj->setUserDefinedData($udf);
408 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
411 $userObj->setExternalAccount(
$_POST[
"ext_account"]);
416 $userObj->setLastPasswordChangeTS(
time() );
419 $userObj->saveAsNew();
424 $userObj->setLanguage(
$_POST[
"language"]);
428 require_once
'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
438 $sknst = explode(
":",
$_POST[
"skin_style"]);
440 if ($userObj->getPref(
"style") != $sknst[1] ||
441 $userObj->getPref(
"skin") != $sknst[0])
443 $userObj->setPref(
"skin", $sknst[0]);
444 $userObj->setPref(
"style", $sknst[1]);
449 $userObj->setPref(
"hits_per_page",
$_POST[
"hits_per_page"]);
457 $userObj->setPref(
"hide_own_online_status",
$_POST[
"hide_own_online_status"] ?
'y' :
'n');
461 $userObj->setPref(
'bs_allow_to_contact_me',
$_POST[
'bs_allow_to_contact_me'] ?
'y' :
'n');
465 $userObj->setPref(
'chat_osc_accept_msg',
$_POST[
'chat_osc_accept_msg'] ?
'y' :
'n');
467 if((
int)$ilSetting->get(
'session_reminder_enabled'))
469 $userObj->setPref(
'session_reminder_enabled', (
int)
$_POST[
'session_reminder_enabled']);
471 $userObj->writePrefs();
474 $rbacadmin->assignUser(
$_POST[
"default_role"],$userObj->getId(),
true);
476 $msg = $this->lng->txt(
"user_added");
478 $ilUser->setPref(
'send_info_mails', (
$_POST[
'send_mail'] ==
'y') ?
'y' :
'n');
479 $ilUser->writePrefs();
481 $this->
object = $userObj;
488 if( $profileMaybeIncomplete )
490 include_once
'Services/User/classes/class.ilUserProfile.php';
493 $this->
object->setProfileIncomplete(
true );
494 $this->
object->update();
499 if(
$_POST[
'send_mail'] ==
'y')
501 include_once(
'Services/Mail/classes/class.ilAccountMail.php');
503 $acc_mail->useLangVariablesAsFallback(
true);
504 $acc_mail->setUserPassword(
$_POST[
'passwd']);
505 $acc_mail->setUser($userObj);
507 if ($acc_mail->send())
509 $msg = $msg.
'<br />'.$this->lng->txt(
'mail_sent');
514 $msg = $msg.
'<br />'.$this->lng->txt(
'mail_not_sent');
524 if(strtolower(
$_GET[
"baseClass"]) ==
'iladministrationgui')
526 $this->ctrl->redirectByClass(
"ilobjuserfoldergui",
"view");
530 $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
535 $this->form_gui->setValuesByPost();
536 $tpl->setContent($this->form_gui->getHtml());
547 global
$ilias, $rbacsystem, $rbacreview, $rbacadmin, $styleDefinition,
$ilUser 550 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
553 $settings = $ilias->getAllSettings();
556 if($this->usrf_ref_id ==
USER_FOLDER_ID and !$rbacsystem->checkAccess(
'visible,read',$this->usrf_ref_id))
558 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->
ilias->error_obj->MESSAGE);
565 if(!$rbacsystem->checkAccess(
'cat_administrate_users',$this->object->getTimeLimitOwner()))
567 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->
ilias->error_obj->MESSAGE);
573 $this->tabs_gui->clearTargets();
577 $this->initForm(
"edit");
579 $this->showAcceptedTermsOfService();
580 $this->tpl->setContent($this->form_gui->getHTML());
602 $from = $this->form_gui->getItemByPostVar(
'time_limit_from')->getDate();
603 $user->setTimeLimitFrom($from
607 $until = $this->form_gui->getItemByPostVar(
'time_limit_until')->getDate();
608 $user->setTimeLimitUntil($until
612 $user->setTimeLimitUnlimited($this->form_gui->getInput(
'time_limit_unlimited'));
614 if($a_mode ==
'create')
616 $user->setTimeLimitOwner($this->usrf_ref_id);
622 $bd = $this->form_gui->getItemByPostVar(
'birthday');
623 $bd = $bd->getDate();
624 $user->setBirthday($bd
630 $user->setLogin($this->form_gui->getInput(
'login'));
636 $user->setGender($this->form_gui->getInput(
'gender'));
642 $user->setUTitle($this->form_gui->getInput(
'title'));
648 $user->setFirstname($this->form_gui->getInput(
'firstname'));
653 $user->setLastname($this->form_gui->getInput(
'lastname'));
655 $user->setFullname();
660 $user->setInstitution($this->form_gui->getInput(
'institution'));
666 $user->setDepartment($this->form_gui->getInput(
'department'));
671 $user->setStreet($this->form_gui->getInput(
'street'));
676 $user->setCity($this->form_gui->getInput(
'city'));
681 $user->setZipcode($this->form_gui->getInput(
'zipcode'));
686 $user->setCountry($this->form_gui->getInput(
'country'));
691 $user->setSelectedCountry($this->form_gui->getInput(
'sel_country'));
696 $user->setPhoneOffice($this->form_gui->getInput(
'phone_office'));
701 $user->setPhoneHome($this->form_gui->getInput(
'phone_home'));
706 $user->setPhoneMobile($this->form_gui->getInput(
'phone_mobile'));
711 $user->setFax($this->form_gui->getInput(
'fax'));
716 $user->setMatriculation($this->form_gui->getInput(
'matriculation'));
721 $user->setEmail($this->form_gui->getInput(
'email'));
726 $user->setHobby($this->form_gui->getInput(
'hobby'));
731 $user->setComment($this->form_gui->getInput(
'referral_comment'));
735 $user->setGeneralInterests($this->form_gui->getInput(
'interests_general'));
736 $user->setOfferingHelp($this->form_gui->getInput(
'interests_help_offered'));
737 $user->setLookingForHelp($this->form_gui->getInput(
'interests_help_looking'));
740 $user->setClientIP($this->form_gui->getInput(
'client_ip'));
743 $user->setLatitude($this->form_gui->getInput(
'latitude'));
744 $user->setLongitude($this->form_gui->getInput(
'longitude'));
745 $user->setLocationZoom($this->form_gui->getInput(
'loc_zoom'));
748 $user->setAuthMode($this->form_gui->getInput(
'auth_mode'));
749 $user->setExternalAccount($this->form_gui->getInput(
'ext_account'));
751 if((
int) $user->getActive() != (int) $this->form_gui->getInput(
'active'))
753 $user->setActive($this->form_gui->getInput(
'active'), $ilUser->getId());
768 if($this->usrf_ref_id ==
USER_FOLDER_ID and !$rbacsystem->checkAccess(
'visible,read,write',$this->usrf_ref_id))
770 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->
ilias->error_obj->MESSAGE);
777 if(!$rbacsystem->checkAccess(
'cat_administrate_users',$this->object->getTimeLimitOwner()))
779 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->
ilias->error_obj->MESSAGE);
782 $this->initForm(
"edit");
785 unset(
$_POST[
'approve_date']);
786 $_POST[
'agree_date'] = $this->
object->getAgreeDate();
787 unset(
$_POST[
'last_login']);
790 $profileMaybeIncomplete =
false;
791 if($this->form_gui->getInput(
'ignore_rf',
false))
796 if ($this->form_gui->checkInput())
801 && trim(
$_POST[
'passwd']) !=
"")
810 if(
$_POST[
'active'] == 1 )
815 #$this->object->assignData($_POST); 819 foreach(
$_POST as $k => $v)
821 if (substr($k, 0, 4) ==
"udf_")
823 $udf[substr($k, 4)] = $v;
826 $this->
object->setUserDefinedData($udf);
830 $this->
object->updateLogin(
$_POST[
'login']);
835 $this->form_gui->setValuesByPost();
836 return $tpl->setContent($this->form_gui->getHtml());
839 $this->
object->setTitle($this->
object->getFullname());
840 $this->
object->setDescription($this->
object->getEmail());
844 $this->
object->setLanguage($this->form_gui->getInput(
'language'));
847 require_once
'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
862 $sknst = explode(
":",
$_POST[
"skin_style"]);
864 if ($this->
object->getPref(
"style") != $sknst[1] ||
865 $this->
object->getPref(
"skin") != $sknst[0])
867 $this->
object->setPref(
"skin", $sknst[0]);
868 $this->
object->setPref(
"style", $sknst[1]);
873 $this->
object->setPref(
"hits_per_page",
$_POST[
"hits_per_page"]);
881 $this->
object->setPref(
"hide_own_online_status",
$_POST[
"hide_own_online_status"] ?
'y' :
'n');
885 $this->
object->setPref(
'bs_allow_to_contact_me',
$_POST[
'bs_allow_to_contact_me'] ?
'y' :
'n');
889 $this->
object->setPref(
'chat_osc_accept_msg',
$_POST[
'chat_osc_accept_msg'] ?
'y' :
'n');
894 $this->
object->setLastPasswordChangeTS(
time() );
897 if((
int)$ilSetting->get(
'session_reminder_enabled'))
899 $this->
object->setPref(
'session_reminder_enabled', (
int)
$_POST[
'session_reminder_enabled']);
903 $this->
object->setProfileIncomplete(
false );
905 $this->update = $this->
object->update();
910 if ($ilUser->getId() == $this->
object->getId())
912 $ilUser->readPrefs();
914 $ilUser->setPref(
'send_info_mails', (
$_POST[
'send_mail'] ==
'y') ?
'y' :
'n');
915 $ilUser->writePrefs();
918 $msg = $this->lng->txt(
'saved_successfully').$mail_message;
926 if( $profileMaybeIncomplete )
928 include_once
'Services/User/classes/class.ilUserProfile.php';
931 $this->
object->setProfileIncomplete(
true );
932 $this->
object->update();
939 if (strtolower(
$_GET[
"baseClass"]) ==
'iladministrationgui')
941 $this->ctrl->redirectByClass(
"ilobjuserfoldergui",
"view");
945 $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
950 $this->form_gui->setValuesByPost();
951 $tpl->setContent($this->form_gui->getHtml());
965 $data[
"auth_mode"] = $this->
object->getAuthMode();
966 $data[
"login"] = $this->
object->getLogin();
969 $data[
"ext_account"] = $this->
object->getExternalAccount();
974 $data[
"approve_date"] = ($this->
object->getApproveDate() !=
"")
977 $data[
"agree_date"] = ($this->
object->getAgreeDate() !=
"")
980 $data[
"last_login"] = ($this->
object->getLastLogin() !=
"")
983 $data[
"active"] = $this->
object->getActive();
984 $data[
"time_limit_unlimited"] = $this->
object->getTimeLimitUnlimited();
986 $data[
"time_limit_from"] = $this->
object->getTimeLimitFrom()
989 $data[
"time_limit_until"] = $this->
object->getTimeLimitUntil()
995 require_once
'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
1024 $data[
"gender"] = $this->
object->getGender();
1025 $data[
"firstname"] = $this->
object->getFirstname();
1026 $data[
"lastname"] = $this->
object->getLastname();
1027 $data[
"title"] = $this->
object->getUTitle();
1028 $data[
'birthday'] = $this->
object->getBirthday()
1031 $data[
"institution"] = $this->
object->getInstitution();
1032 $data[
"department"] = $this->
object->getDepartment();
1033 $data[
"street"] = $this->
object->getStreet();
1034 $data[
"city"] = $this->
object->getCity();
1035 $data[
"zipcode"] = $this->
object->getZipcode();
1036 $data[
"country"] = $this->
object->getCountry();
1037 $data[
"sel_country"] = $this->
object->getSelectedCountry();
1038 $data[
"phone_office"] = $this->
object->getPhoneOffice();
1039 $data[
"phone_home"] = $this->
object->getPhoneHome();
1040 $data[
"phone_mobile"] = $this->
object->getPhoneMobile();
1041 $data[
"fax"] = $this->
object->getFax();
1042 $data[
"email"] = $this->
object->getEmail();
1043 $data[
"hobby"] = $this->
object->getHobby();
1044 $data[
"referral_comment"] = $this->
object->getComment();
1047 $data[
"interests_general"] = $this->
object->getGeneralInterests();
1048 $data[
"interests_help_offered"] = $this->
object->getOfferingHelp();
1049 $data[
"interests_help_looking"] = $this->
object->getLookingForHelp();
1052 $data[
"matriculation"] = $this->
object->getMatriculation();
1053 $data[
"client_ip"] = $this->
object->getClientIP();
1056 include_once
'./Services/User/classes/class.ilUserDefinedFields.php';
1058 $user_defined_data = $this->
object->getUserDefinedData();
1059 foreach($this->user_defined_fields->getDefinitions() as $field_id => $definition)
1061 $data[
"udf_".$field_id] = $user_defined_data[
"f_".$field_id];
1065 $data[
"language"] = $this->
object->getLanguage();
1066 $data[
"skin_style"] = $this->
object->skin.
":".$this->
object->prefs[
"style"];
1067 $data[
"hits_per_page"] = $this->
object->prefs[
"hits_per_page"];
1069 $data[
"hide_own_online_status"] = $this->
object->prefs[
"hide_own_online_status"] ==
'y';
1070 $data[
'bs_allow_to_contact_me'] = $this->
object->prefs[
'bs_allow_to_contact_me'] ==
'y';
1071 $data[
'chat_osc_accept_msg'] = $this->
object->prefs[
'chat_osc_accept_msg'] ==
'y';
1072 $data[
"session_reminder_enabled"] = (int)$this->
object->prefs[
"session_reminder_enabled"];
1074 $data[
"send_mail"] = ($this->object->prefs[
'send_info_mails'] ==
'y');
1077 $this->form_gui->setValuesByArray($data);
1083 function initForm($a_mode)
1087 $settings = $ilSetting->getAll();
1089 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1092 $this->form_gui->setFormAction($ilCtrl->getFormAction($this));
1093 if ($a_mode ==
"create")
1095 $this->form_gui->setTitle($lng->txt(
"usr_new"));
1099 $this->form_gui->setTitle($lng->txt(
"usr_edit"));
1104 $sec_l->setTitle($lng->txt(
"login_data"));
1105 $this->form_gui->addItem($sec_l);
1108 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
1112 foreach ($active_auth_modes as $auth_name => $auth_key)
1114 if ($auth_name ==
'default')
1121 #$name = $this->lng->txt('auth_'.$auth_name); 1122 include_once
'./Services/Authentication/classes/class.ilAuthUtils.php';
1127 $option[$auth_name] = $name;
1130 $this->form_gui->addItem($am);
1132 if($a_mode ==
"edit")
1136 $this->form_gui->addItem($id);
1142 if ($a_mode ==
"edit")
1144 $lo->setCurrentUserId($this->
object->getId());
1147 include_once
'Services/Calendar/classes/class.ilDate.php';
1152 $this->lng->txt(
'usr_loginname_history_info'),
1154 $last_history_entry[0]
1161 $this->form_gui->addItem($lo);
1169 $pw->setMaxLength(80);
1170 $pw->setValidateAuthPost(
"auth_mode");
1171 if ($a_mode ==
"create")
1173 $pw->setRequiredOnAuth(
true);
1176 $this->form_gui->addItem($pw);
1181 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
1184 $ext =
new ilTextInputGUI($lng->txt(
"user_ext_account"),
"ext_account");
1186 $ext->setMaxLength(250);
1187 $ext->setInfo($lng->txt(
"user_ext_account_desc"));
1188 $this->form_gui->addItem($ext);
1193 $sec_si->setTitle($this->lng->txt(
"system_information"));
1194 $this->form_gui->addItem($sec_si);
1197 if ($a_mode ==
"edit")
1199 $sia =
array(
"create_date",
"approve_date",
"agree_date",
"last_login",
"owner");
1203 $this->form_gui->addItem($siai);
1210 $this->form_gui->addItem($ac);
1213 $lng->loadLanguageModule(
'crs');
1218 $op1 =
new ilRadioOption($lng->txt(
"user_access_unlimited"), 1);
1219 $radg->addOption($op1);
1220 $op2 =
new ilRadioOption($lng->txt(
"user_access_limited"), 0);
1221 $radg->addOption($op2);
1230 $acfrom->setShowTime(
true);
1232 $op2->addSubItem($acfrom);
1237 $acto->setShowTime(
true);
1239 $op2->addSubItem($acto);
1242 $this->form_gui->addItem($radg);
1244 require_once
'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
1247 $lng->loadLanguageModule(
"file");
1250 $quota_head->setTitle($lng->txt(
"repository_disk_quota"));
1251 $this->form_gui->addItem($quota_head);
1254 $disk_quota =
new ilTextInputGUI($lng->txt(
"disk_quota"),
"disk_quota");
1256 $disk_quota->setMaxLength(11);
1257 $disk_quota->setInfo($this->lng->txt(
"enter_in_mb_desc"));
1258 $this->form_gui->addItem($disk_quota);
1260 if ($a_mode ==
"edit")
1263 require_once
'Services/WebDAV/classes/class.ilDiskQuotaChecker.php';
1265 if ($dq_info[
'user_disk_quota'] > $dq_info[
'role_disk_quota'])
1267 $info_text = sprintf($lng->txt(
'disk_quota_is_1_instead_of_2_by_3'),
1270 $dq_info[
'role_title']);
1272 else if (is_infinite($dq_info[
'role_disk_quota']))
1274 $info_text = sprintf($lng->txt(
'disk_quota_is_unlimited_by_1'), $dq_info[
'role_title']);
1278 $info_text = sprintf($lng->txt(
'disk_quota_is_1_by_2'),
1280 $dq_info[
'role_title']);
1282 $disk_quota->setInfo($this->lng->txt(
"enter_in_mb_desc").
'<br>'.$info_text);
1288 if ($du_info[
'last_update'] === null)
1290 $disk_usage->
setValue($lng->txt(
'unknown'));
1295 $info =
'<table class="il_user_quota_disk_usage_overview">';
1297 foreach ($du_info[
'details'] as $detail_data)
1300 '<td class="std">'.$detail_data[
'count'].
'</td>'.
1301 '<td class="std">'.$lng->txt($detail_data[
'type']).
'</td>'.
1302 '<td class="std">'.ilUtil::formatSize($detail_data[
'size'],
'short').
'</td>'.
1306 $info .=
'</table>';
1307 $info .=
'<br>'.$this->lng->txt(
'last_update').
': '.
1309 $disk_usage->setInfo(
$info);
1312 $this->form_gui->addItem($disk_usage);
1315 if (
true || $dq_info[
'last_reminder'])
1321 $reminder->setInfo($this->lng->txt(
"disk_quota_last_reminder_sent_desc"));
1322 $this->form_gui->addItem($reminder);
1329 $lng->loadLanguageModule(
"file");
1332 $quota_head->setTitle($lng->txt(
"personal_workspace_disk_quota"));
1333 $this->form_gui->addItem($quota_head);
1336 $wsp_disk_quota =
new ilTextInputGUI($lng->txt(
"disk_quota"),
"wsp_disk_quota");
1338 $wsp_disk_quota->setMaxLength(11);
1339 $wsp_disk_quota->setInfo($this->lng->txt(
"enter_in_mb_desc"));
1340 $this->form_gui->addItem($wsp_disk_quota);
1342 if ($a_mode ==
"edit")
1345 require_once
'Services/WebDAV/classes/class.ilDiskQuotaChecker.php';
1347 if ($dq_info[
'user_wsp_disk_quota'] > $dq_info[
'role_wsp_disk_quota'])
1349 $info_text = sprintf($lng->txt(
'disk_quota_is_1_instead_of_2_by_3'),
1352 $dq_info[
'role_title']);
1354 else if (is_infinite($dq_info[
'role_wsp_disk_quota']))
1356 $info_text = sprintf($lng->txt(
'disk_quota_is_unlimited_by_1'), $dq_info[
'role_title']);
1360 $info_text = sprintf($lng->txt(
'disk_quota_is_1_by_2'),
1362 $dq_info[
'role_title']);
1364 $wsp_disk_quota->setInfo($this->lng->txt(
"enter_in_mb_desc").
'<br>'.$info_text);
1368 include_once
"Services/DiskQuota/classes/class.ilDiskQuotaHandler.php";
1371 if (!
sizeof($du_info))
1373 $disk_usage->
setValue($lng->txt(
'unknown'));
1378 $info =
'<table class="il_user_quota_disk_usage_overview">';
1380 foreach ($du_info as $detail_data)
1383 '<td class="std">'.$detail_data[
'count'].
'</td>'.
1384 '<td class="std">'.$lng->txt(
"obj_".$detail_data[
"src_type"]).
'</td>'.
1385 '<td class="std">'.ilUtil::formatSize($detail_data[
'filesize'],
'short').
'</td>'.
1389 $info .=
'</table>';
1390 $disk_usage->setInfo(
$info);
1393 $this->form_gui->addItem($disk_usage);
1407 $sec_pd->setTitle($this->lng->txt(
"personal_data"));
1408 $this->form_gui->addItem($sec_pd);
1415 $gndr->
setRequired(isset($settings[
"require_gender"]) && $settings[
"require_gender"]);
1417 $gndr->addOption($female);
1419 $gndr->addOption($male);
1420 $this->form_gui->addItem($gndr);
1424 $fields =
array(
"firstname" =>
true,
"lastname" =>
true,
1425 "title" => isset($settings[
"require_title"]) && $settings[
"require_title"]);
1426 foreach($fields as $field => $req)
1431 $caption = ($field ==
"title")
1436 $inp->setMaxLength(32);
1437 $inp->setRequired($req);
1438 $this->form_gui->addItem($inp);
1446 if ($a_mode ==
"edit" || $a_mode ==
"upload")
1451 $this->form_gui->addItem($pi);
1457 $birthday->
setRequired(isset($settings[
"require_birthday"]) && $settings[
"require_birthday"]);
1458 $this->form_gui->addItem($birthday);
1465 array(
"institution", 40, 80),
1466 array(
"department", 40, 80),
1467 array(
"street", 40, 40),
1468 array(
"city", 40, 40),
1469 array(
"zipcode", 10, 10),
1470 array(
"country", 40, 40),
1471 array(
"sel_country"),
1472 array(
"phone_office", 30, 30),
1473 array(
"phone_home", 30, 30),
1474 array(
"phone_mobile", 30, 30),
1475 array(
"fax", 30, 30));
1478 foreach ($fields as $field)
1484 $sec_cd->setTitle($this->lng->txt(
"contact_data"));
1485 $this->form_gui->addItem($sec_cd);
1488 if ($a_mode ==
"edit")
1492 $this->form_gui->addItem($orgus);
1498 if ($field[0] !=
"sel_country")
1502 $inp->setMaxLength($field[2]);
1503 $inp->setRequired(isset($settings[
"require_".$field[0]]) &&
1504 $settings[
"require_".$field[0]]);
1505 $this->form_gui->addItem($inp);
1510 include_once(
"./Services/Form/classes/class.ilCountrySelectInputGUI.php");
1512 $cs->
setRequired(isset($settings[
"require_".$field[0]]) &&
1513 $settings[
"require_".$field[0]]);
1514 $this->form_gui->addItem($cs);
1523 $em->
setRequired(isset($settings[
"require_email"]) &&
1524 $settings[
"require_email"]);
1525 $this->form_gui->addItem($em);
1534 $hob->setRequired(isset($settings[
"require_hobby"]) &&
1535 $settings[
"require_hobby"]);
1536 $this->form_gui->addItem($hob);
1545 $rc->setRequired(isset($settings[
"require_referral_comment"]) &&
1546 $settings[
"require_referral_comment"]);
1547 $this->form_gui->addItem($rc);
1554 $sh->setTitle($lng->txt(
"interests"));
1555 $this->form_gui->addItem($sh);
1557 $multi_fields =
array(
"interests_general",
"interests_help_offered",
"interests_help_looking");
1558 foreach($multi_fields as $multi_field)
1565 $ti->setMaxLength(40);
1567 $ti->setRequired(isset($settings[
"require_".$multi_field]) &&
1568 $settings[
"require_".$multi_field]);
1569 $this->form_gui->addItem($ti);
1578 $sec_oi->setTitle($this->lng->txt(
"user_profile_other"));
1579 $this->form_gui->addItem($sec_oi);
1585 $mr =
new ilTextInputGUI($lng->txt(
"matriculation"),
"matriculation");
1587 $mr->setMaxLength(40);
1588 $mr->setRequired(isset($settings[
"require_matriculation"]) &&
1589 $settings[
"require_matriculation"]);
1590 $this->form_gui->addItem($mr);
1596 $ip->setMaxLength(255);
1597 $ip->setInfo($this->lng->txt(
"current_ip").
" ".
$_SERVER[
"REMOTE_ADDR"].
" <br />".
1598 '<span class="warning">'.$this->lng->txt(
"current_ip_alert").
"</span>");
1599 $this->form_gui->addItem($ip);
1602 include_once
'./Services/User/classes/class.ilUserDefinedFields.php';
1607 $all_defs = $user_defined_fields->getDefinitions();
1611 $all_defs = $user_defined_fields->getChangeableLocalUserAdministrationDefinitions();
1614 foreach($all_defs as $field_id => $definition)
1619 "udf_".$definition[
'field_id']);
1621 $udf->setMaxLength(255);
1626 "udf_".$definition[
'field_id']);
1627 $udf->setUseRte(
true);
1632 "udf_".$definition[
'field_id']);
1633 $udf->setOptions($user_defined_fields->fieldValuesToSelectArray(
1634 $definition[
'field_values']));
1636 $udf->setRequired($definition[
'required']);
1637 $this->form_gui->addItem($udf);
1642 $a_mode ==
'create' or 1652 $sec_st->setTitle($this->lng->txt(
"settings"));
1653 $this->form_gui->addItem($sec_st);
1657 if ($a_mode ==
"create")
1662 $role->setValue($this->default_role);
1663 $role->setOptions($this->selectable_roles);
1664 $this->form_gui->addItem($role);
1673 $lng->loadLanguageModule(
"meta");
1675 foreach($languages as
$l)
1680 $lang->setValue($ilSetting->get(
"language"));
1681 $this->form_gui->addItem(
$lang);
1692 $skins = $styleDefinition->getAllSkins();
1695 if (is_array($skins))
1700 foreach($skins as $skin)
1702 foreach($skin->getStyles() as
$style)
1704 include_once(
"./Services/Style/System/classes/class.ilSystemStyleSettings.php");
1710 $options[$skin->getId().
":".
$style->getId()] = $skin->getName().
" / ".
$style->getName();
1715 $sk->setValue($ilClientIniFile->readVariable(
"layout",
"skin").
1716 ":".$ilClientIniFile->readVariable(
"layout",
"style"));
1718 $this->form_gui->addItem($sk);
1726 $options =
array(10 => 10, 15 => 15, 20 => 20, 30 => 30, 40 => 40,
1727 50 => 50, 100 => 100, 9999 => $this->lng->txt(
"no_limit"));
1728 $hpp->setOptions($options);
1729 $hpp->setValue($ilSetting->get(
"hits_per_page"));
1730 $this->form_gui->addItem($hpp);
1747 $lng->loadLanguageModule(
"awrn");
1748 $os =
new ilCheckboxInputGUI($lng->txt(
"awrn_hide_from_awareness"),
"hide_own_online_status");
1749 $this->form_gui->addItem($os);
1755 $lng->loadLanguageModule(
'buddysystem');
1756 $os =
new ilCheckboxInputGUI($lng->txt(
'buddy_allow_to_contact_me'),
'bs_allow_to_contact_me');
1757 if($a_mode ==
'create')
1761 $this->form_gui->addItem($os);
1765 $lng->loadLanguageModule(
'chatroom');
1766 $chat_osc_acm =
new ilCheckboxInputGUI($lng->txt(
'chat_osc_accept_msg'),
'chat_osc_accept_msg');
1767 if($a_mode ==
'create')
1771 $this->form_gui->addItem($chat_osc_acm);
1774 if((
int)$ilSetting->get(
'session_reminder_enabled'))
1776 $cb =
new ilCheckboxInputGUI($this->lng->txt(
'session_reminder'),
'session_reminder_enabled');
1778 $this->form_gui->addItem($cb);
1785 $sec_op->setTitle($this->lng->txt(
"options"));
1786 $this->form_gui->addItem($sec_op);
1791 $se->
setInfo($lng->txt(
'inform_user_mail_info'));
1793 $se->setChecked(($ilUser->getPref(
'send_info_mails') ==
'y'));
1794 $this->form_gui->addItem($se);
1798 $irf->
setInfo($lng->txt(
'ignore_required_fields_info'));
1800 $this->form_gui->addItem($irf);
1805 if ($a_mode ==
"create" || $a_mode ==
"save")
1807 $this->form_gui->addCommandButton(
"save", $lng->txt(
"save"));
1809 if ($a_mode ==
"edit" || $a_mode ==
"update")
1811 $this->form_gui->addCommandButton(
"update", $lng->txt(
"save"));
1813 $this->form_gui->addCommandButton(
"cancel", $lng->txt(
"cancel"));
1829 static $settings = null;
1838 if($settings == NULL)
1840 $settings = $ilSetting->getAll();
1842 return (
bool) $settings[
'usr_settings_changeable_lua_'.$a_field];
1858 !$rbacsystem->checkAccess(
'visible,read',$this->usrf_ref_id))
1860 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->
ilias->error_obj->MESSAGE);
1867 if(!$rbacsystem->checkAccess(
'cat_administrate_users',$this->object->getTimeLimitOwner()))
1869 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->
ilias->error_obj->MESSAGE);
1873 $userfile_input = $this->form_gui->getItemByPostVar(
"userfile");
1875 if ($_FILES[
"userfile"][
"tmp_name"] ==
"")
1877 if ($userfile_input->getDeletionFlag())
1879 $this->
object->removeUserPicture();
1883 if ($_FILES[
"userfile"][
"size"] == 0)
1890 $image_dir = $webspace_dir.
"/usr_images";
1891 $store_file =
"usr_".$this->object->getId().
".".
"jpg";
1894 $this->
object->setPref(
"profile_image", $store_file);
1895 $this->
object->update();
1898 $pi = pathinfo($_FILES[
"userfile"][
"name"]);
1899 $uploaded_file = $image_dir.
"/upload_".$this->
object->getId().
".".$pi[
"extension"];
1901 $uploaded_file,
false))
1904 $this->ctrl->redirect($this,
"showProfile");
1906 chmod($uploaded_file, 0770);
1910 $show_file =
"$image_dir/usr_".$this->object->getId().
".jpg";
1911 $thumb_file =
"$image_dir/usr_".$this->object->getId().
"_small.jpg";
1912 $xthumb_file =
"$image_dir/usr_".$this->object->getId().
"_xsmall.jpg";
1913 $xxthumb_file =
"$image_dir/usr_".$this->object->getId().
"_xxsmall.jpg";
1922 ilUtil::execConvert($uploaded_file .
"[0] -geometry 200x200^ -gravity center -extent 200x200 -quality 100 JPEG:".$show_file);
1923 ilUtil::execConvert($uploaded_file .
"[0] -geometry 100x100^ -gravity center -extent 100x100 -quality 100 JPEG:".$thumb_file);
1924 ilUtil::execConvert($uploaded_file .
"[0] -geometry 75x75^ -gravity center -extent 75x75 -quality 100 JPEG:".$xthumb_file);
1925 ilUtil::execConvert($uploaded_file .
"[0] -geometry 30x30^ -gravity center -extent 30x30 -quality 100 JPEG:".$xxthumb_file);
1929 ilUtil::execConvert($uploaded_file .
"[0] -geometry 200x200 -quality 100 JPEG:".$show_file);
1930 ilUtil::execConvert($uploaded_file .
"[0] -geometry 100x100 -quality 100 JPEG:".$thumb_file);
1931 ilUtil::execConvert($uploaded_file .
"[0] -geometry 75x75 -quality 100 JPEG:".$xthumb_file);
1932 ilUtil::execConvert($uploaded_file .
"[0] -geometry 30x30 -quality 100 JPEG:".$xxthumb_file);
1943 $image_dir = $webspace_dir.
"/usr_images";
1944 $file = $image_dir.
"/usr_".$this->
object->getID().
".".
"jpg";
1945 $thumb_file = $image_dir.
"/usr_".$this->
object->getID().
"_small.jpg";
1946 $xthumb_file = $image_dir.
"/usr_".$this->
object->getID().
"_xsmall.jpg";
1947 $xxthumb_file = $image_dir.
"/usr_".$this->
object->getID().
"_xxsmall.jpg";
1948 $upload_file = $image_dir.
"/upload_".$this->
object->getID();
1951 $this->
object->setPref(
"profile_image",
"");
1952 $this->
object->update();
1955 if (@is_file(
$file))
1959 if (@is_file($thumb_file))
1961 unlink($thumb_file);
1963 if (@is_file($xthumb_file))
1965 unlink($xthumb_file);
1967 if (@is_file($xxthumb_file))
1969 unlink($xxthumb_file);
1971 if (@is_file($upload_file))
1973 unlink($upload_file);
1987 global $rbacsystem, $rbacadmin, $rbacreview;
1989 if (!$rbacsystem->checkAccess(
"edit_roleassignment", $this->usrf_ref_id))
1991 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_assign_role_to_user"),$this->
ilias->error_obj->MESSAGE);
1998 if ($this->
object->getId() == SYSTEM_USER_ID
and in_array(SYSTEM_ROLE_ID, $posted_roles))
2000 array_push($selected_roles,SYSTEM_ROLE_ID);
2003 $global_roles_all = $rbacreview->getGlobalRoles();
2004 $assigned_roles_all = $rbacreview->assignedRoles($this->
object->getId());
2005 $assigned_roles = array_intersect($assigned_roles_all,$posted_roles);
2006 $assigned_global_roles_all = array_intersect($assigned_roles_all,$global_roles_all);
2007 $assigned_global_roles = array_intersect($assigned_global_roles_all,$posted_roles);
2008 $posted_global_roles = array_intersect($selected_roles,$global_roles_all);
2010 if ((empty($selected_roles)
and count($assigned_roles_all) == count($assigned_roles))
2011 or (empty($posted_global_roles)
and count($assigned_global_roles_all) == count($assigned_global_roles)))
2015 ilUtil::sendFailure($this->lng->txt(
"msg_min_one_role").
"<br/>".$this->lng->txt(
"action_aborted"),
true);
2016 $this->ctrl->redirect($this,
'roleassignment');
2019 foreach (array_diff($assigned_roles,$selected_roles) as $role)
2021 $rbacadmin->deassignUser($role,$this->
object->getId());
2024 foreach (array_diff($selected_roles,$assigned_roles) as $role)
2026 $rbacadmin->assignUser($role,$this->
object->getId(),
false);
2029 include_once
"./Services/AccessControl/classes/class.ilObjRole.php";
2032 $this->
object->update();
2036 if(strtolower(
$_GET[
"baseClass"]) ==
'iladministrationgui')
2038 $this->ctrl->redirect($this,
'roleassignment');
2042 $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
2054 global $rbacreview,$rbacsystem,
$ilUser, $ilTabs;
2056 $ilTabs->activateTab(
"role_assignment");
2058 if (!$rbacsystem->checkAccess(
"edit_roleassignment", $this->usrf_ref_id))
2060 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_assign_role_to_user"),$this->
ilias->error_obj->MESSAGE);
2070 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.usr_role_assignment.html',
'Services/User');
2074 $this->tpl->setCurrentBlock(
"filter");
2075 $this->tpl->setVariable(
"FILTER_TXT_FILTER",$this->lng->txt(
'filter'));
2077 $this->tpl->setVariable(
"FILTER_ACTION",$this->ctrl->getFormAction($this));
2078 $this->tpl->setVariable(
"FILTER_NAME",
'roleassignment');
2079 $this->tpl->setVariable(
"FILTER_VALUE",$this->lng->txt(
'apply_filter'));
2080 $this->tpl->parseCurrentBlock();
2084 include_once(
"./Services/User/classes/class.ilRoleAssignmentTableGUI.php");
2088 $role_list = $rbacreview->getRolesByFilter(
$tab->filter[
"role_filter"],$this->object->getId());
2089 $assigned_roles = $rbacreview->assignedRoles($this->
object->getId());
2093 include_once (
'./Services/AccessControl/classes/class.ilObjRole.php');
2096 foreach ($role_list as $role)
2099 $rolf = $rbacreview->getFoldersAssignedToRole($role[
"obj_id"],
true);
2102 if ($rbacreview->isDeleted($rolf[0]))
2110 if ($this->tree->isInTree($rolf[0]))
2112 if ($rolf[0] == ROLE_FOLDER_ID)
2114 $path = $this->lng->txt(
"global");
2118 $tmpPath = $this->tree->getPathFull($rolf[0]);
2131 $path = $tmpPath[count($tmpPath)-1][
"title"];
2136 $path =
"<b>Rolefolder ".$rolf[0].
" not found in tree! (Role ".$role[
"obj_id"].
")</b>";
2142 if (($this->
object->getId() == SYSTEM_USER_ID
and $role[
"obj_id"] == SYSTEM_ROLE_ID)
2143 or (!in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId()))
and $role[
"obj_id"] == SYSTEM_ROLE_ID))
2149 if($role[
'obj_id'] == SYSTEM_ROLE_ID && !$rbacreview->isAssigned($ilUser->getId(),SYSTEM_ROLE_ID))
2151 include_once
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php';
2158 if (substr($role[
"title"],0,3) ==
"il_")
2162 $rolf_arr = $rbacreview->getFoldersAssignedToRole($role[
"obj_id"],
true);
2163 $rolf2 = $rolf_arr[0];
2170 $parent_node = $this->tree->getNodeData($rolf2);
2172 $role[
"description"] = $this->lng->txt(
"obj_".$parent_node[
"type"]).
" (#".$parent_node[
"obj_id"].
")";
2175 $role_ids[
$counter] = $role[
"obj_id"];
2177 $result_set[
$counter][] = $checkbox = ilUtil::formCheckBox(in_array($role[
"obj_id"],$assigned_roles),
"role_id[]",$role[
"obj_id"],$disabled).
"<input type=\"hidden\" name=\"role_id_ctrl[]\" value=\"".$role[
"obj_id"].
"\"/>";
2178 $this->ctrl->setParameterByClass(
"ilobjrolegui",
"ref_id", $rolf[0]);
2179 $this->ctrl->setParameterByClass(
"ilobjrolegui",
"obj_id", $role[
"obj_id"]);
2182 $result_set[
$counter][] = $role[
"description"];
2185 if ($role[
"role_type"] ==
"local") {
2187 $obj_id = $rbacreview->getObjectOfRole($role[
"rol_id"]);
2193 foreach ($ref_ids as
$ref_id) {}
2195 require_once(
"./Services/Link/classes/class.ilLink.php");
2206 "context" => $context,
"checkbox" => $checkbox,
2207 "role" => $link,
"title" =>
$title);
2214 $this->tpl->setVariable(
"ROLES_TABLE",
$tab->getHTML());
2224 include_once(
"./Services/User/classes/class.ilRoleAssignmentTableGUI.php");
2226 $table_gui->writeFilterToSession();
2227 $table_gui->resetOffset();
2236 include_once(
"./Services/User/classes/class.ilRoleAssignmentTableGUI.php");
2238 $table_gui->resetOffset();
2239 $table_gui->resetFilter();
2248 for($i=0;$i<=60;$i++)
2250 $days[$i] = $i < 10 ?
"0".$i : $i;
2255 for($i=0;$i<24;$i++)
2257 $days[$i] = $i < 10 ?
"0".$i : $i;
2262 for($i=1;$i<32;$i++)
2264 $days[$i] = $i < 10 ?
"0".$i : $i;
2269 for($i=1;$i<13;$i++)
2271 $month[$i] = $i < 10 ?
"0".$i : $i;
2295 return mktime($a_time_arr[
"hour"],
2296 $a_time_arr[
"minute"],
2297 $a_time_arr[
"second"],
2298 $a_time_arr[
"month"],
2300 $a_time_arr[
"year"]);
2313 $action[0] = $this->lng->txt(
'assigned_roles');
2314 $action[1] = $this->lng->txt(
'all_roles');
2315 $action[2] = $this->lng->txt(
'all_global_roles');
2316 $action[3] = $this->lng->txt(
'all_local_roles');
2317 $action[4] = $this->lng->txt(
'internal_local_roles_only');
2318 $action[5] = $this->lng->txt(
'non_internal_local_roles_only');
2325 parent::hitsperpageObject();
2337 $ilLocator->clearItems();
2339 if (
$_GET[
"admin_mode"] ==
"settings")
2341 $this->ctrl->setParameterByClass(
"ilobjsystemfoldergui",
2342 "ref_id", SYSTEM_FOLDER_ID);
2343 $ilLocator->addItem($this->lng->txt(
"administration"),
2344 $this->ctrl->getLinkTargetByClass(
array(
"iladministrationgui",
"ilobjsystemfoldergui"),
""),
2349 $ilLocator->addItem($this->lng->txt(
"obj_".ilObject::_lookupType(
2351 $this->ctrl->getLinkTargetByClass(
"ilobjuserfoldergui",
"view"));
2353 elseif (
$_GET[
'ref_id'] == ROLE_FOLDER_ID)
2355 $ilLocator->addItem($this->lng->txt(
"obj_".ilObject::_lookupType(
2357 $this->ctrl->getLinkTargetByClass(
"ilobjrolefoldergui",
"view"));
2360 if (
$_GET[
"obj_id"] > 0)
2362 $ilLocator->addItem($this->
object->getTitle(),
2363 $this->ctrl->getLinkTarget($this,
"view"));
2380 if(
$_POST[
'send_mail'] !=
'y')
2384 if(!strlen($this->
object->getEmail()))
2392 $usr_lang->loadLanguageModule(
'registration');
2394 include_once
"Services/Mail/classes/class.ilMimeMail.php";
2397 $mmail->autoCheck(
false);
2398 $mmail->From($ilUser->getEmail());
2399 $mmail->To($this->
object->getEmail());
2402 $subject = $usr_lang->txt(
"profile_changed");
2406 $body = ($usr_lang->txt(
"reg_mail_body_salutation").
" ".$this->
object->getFullname().
",\n\n");
2408 $date = $this->
object->getApproveDate();
2410 if((
time() - strtotime($date)) < 10)
2412 $body .= ($usr_lang->txt(
'reg_mail_body_approve').
"\n\n");
2416 $body .= ($usr_lang->txt(
'reg_mail_body_profile_changed').
"\n\n");
2420 if(
$_POST[
'passwd'] !=
'')
2422 $body .= $usr_lang->txt(
"reg_mail_body_text2").
"\n".
2423 ILIAS_HTTP_PATH.
"/login.php?client_id=".$ilias->client_id.
"\n".
2424 $usr_lang->txt(
"login").
": ".$this->
object->getLogin().
"\n".
2425 $usr_lang->txt(
"passwd").
": ".
$_POST[
'passwd'].
"\n\n";
2427 $body .= ($usr_lang->txt(
"reg_mail_body_text3").
"\n");
2428 $body .= $this->
object->getProfileAsString($usr_lang);
2430 $mmail->Subject($subject);
2431 $mmail->Body($body);
2435 return "<br/>".$this->lng->txt(
"mail_sent");
2446 if($a_target == md5(
"usrdelown"))
2448 if($ilUser->getId() != ANONYMOUS_USER_ID &&
2449 $ilUser->hasDeletionFlag())
2451 $ilCtrl->setTargetScript(
"ilias.php");
2452 $ilCtrl->initBaseClass(
"ilpersonaldesktopgui");
2453 $ilCtrl->redirectByClass(
array(
"ilpersonaldesktopgui",
"ilpersonalsettingsgui"),
"deleteOwnAccount3");
2455 exit(
"This account is not flagged for deletion.");
2459 if(substr($a_target, -4) ==
"_bdg")
2461 $_GET[
"baseClass"] =
"ilPersonalDesktopGUI";
2462 $_GET[
"cmd"] =
"jumpToBadges";
2463 include(
"ilias.php");
2467 if (substr($a_target, 0, 1) ==
"n")
2472 if(strpos($a_target,
'contact_approved') !==
false)
2474 $_GET[
'cmd'] =
'approveContactRequest';
2476 else if(strpos($a_target,
'contact_ignored') !==
false)
2478 $_GET[
'cmd'] =
'ignoreContactRequest';
2482 $_GET[
'cmd'] =
'view';
2485 $_GET[
"user_id"] = (int) $a_target;
2486 $_GET[
"baseClass"] =
"ilPublicUserProfileGUI";
2487 $_GET[
"cmdClass"] =
"ilpublicuserprofilegui";
2488 include(
"ilias.php");
2502 $profileMaybeIncomplete =
false;
2504 require_once
'Services/User/classes/class.ilUserProfile.php';
2508 $elm = $this->form_gui->getItemByPostVar($fieldName);
2510 if( !$elm )
continue;
2512 if( $elm->getRequired() )
2514 $profileMaybeIncomplete =
true;
2517 $elm->setRequired(
false );
2521 include_once
'Services/User/classes/class.ilUserDefinedFields.php';
2523 foreach($user_defined_fields->getDefinitions() as $field_id => $definition)
2525 $elm = $this->form_gui->getItemByPostVar(
'udf_'.$definition[
'field_id']);
2527 if( !$elm )
continue;
2529 if( $elm->getRequired() && $definition[
'changeable'] && $definition[
'required'] && $definition[
'visible'] )
2531 $profileMaybeIncomplete =
true;
2534 $elm->setRequired(
false );
2538 return $profileMaybeIncomplete;
2544 protected function showAcceptedTermsOfService()
2549 $agree_date = $this->form_gui->getItemByPostVar(
'agree_date');
2550 if($agree_date && $agree_date->getValue())
2552 $this->lng->loadLanguageModule(
'tos');
2553 require_once
'Services/TermsOfService/classes/class.ilTermsOfServiceHelper.php';
2558 if($entity->getId())
2560 $show_agreement_text =
new ilCheckboxInputGUI($this->lng->txt(
'tos_show_signed_text'),
'tos_show_signed_text');
2563 $agreement_lang->
setValue($this->lng->txt(
'meta_l_' . $entity->getIso2LanguageCode()));
2564 $show_agreement_text->addSubItem($agreement_lang);
2566 require_once
'Services/TermsOfService/classes/form/class.ilTermsOfServiceSignedDocumentFormElementGUI.php';
2568 $show_agreement_text->addSubItem($agreement_document);
2569 $agree_date->addSubItem($show_agreement_text);
2572 else if($agree_date)
2574 $agree_date->setValue($this->lng->txt(
'tos_not_accepted_yet'));
__showUserDefinedFields()
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static isConvertVersionAtLeast($a_version)
Compare convert version numbers.
static _lookupLogin($a_user_id)
lookup login
static isProfileIncomplete($a_user, $a_include_udf=true, $a_personal_data_only=true)
Check if all required personal data fields are set.
Class for user related exception handling in ILIAS.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
This class represents an option in a radio group.
getAdminTabs()
admin and normal tabs are equal for roles
addAdminLocatorItems($a_do_not_add_object=false)
should be overwritten to add object specific items (repository items are preloaded) ...
assignSaveObject()
assign users to role
getValues()
Get values from user object and put them into form.
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']
createObject()
Display user create form.
setValue($a_value)
Set Value.
static _getInstance()
Get instance.
handleIgnoredRequiredFields()
Handles ignored required fields by changing the required flag of form elements.
loadValuesFromForm($a_mode='create')
uploadUserPictureObject()
upload user image
static _isActive()
Static getter.
removeUserPictureObject()
remove user image
static MB2Bytes($a_value)
static _lookupPersonalWorkspaceDiskQuota($a_user_id)
static _getLastHistoryDataByUserId($a_usr_id)
Returns the last used loginname and the changedate of the passed user_id.
static _lookupId($a_user_str)
Lookup id by login.
static getIgnorableRequiredSettings()
Returns an array of all ignorable profiel fields.
static _getActiveAuthModes()
static _lookupActivatedStyle($a_skin, $a_style)
lookup if a style is activated
__unsetSessionVariables()
Class ilObjectOwnershipManagementGUI.
static _resetLoginAttempts($a_usr_id)
static _getAuthMode($a_auth_mode, $a_db_handler='')
static _getAuthModeName($a_auth_key)
const LP_CONTEXT_USER_FOLDER
static _isPersonalWorkspaceActive()
Static getter.
static _getAssignUsersStatus($a_role_id)
static _getAllReferences($a_id)
get all reference ids of object
static _goto($a_target)
Goto user profile screen.
static getPasswordRequirementsInfo()
infotext for ilPasswordInputGUI setInfo()
static _allowPasswordModificationByAuthMode($a_auth_mode)
Allow password modification.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static _enabledUserRelatedData()
check wether user related tracking is enabled or not
isSettingChangeable($a_field)
Check if setting is visible This is the case when called from user folder.
prepareOutput($a_show_subobjects=true)
prepare output
static _enabledLearningProgress()
check wether learing progress is enabled or not
__checkUserDefinedRequiredFields()
display user create form
static execConvert($args)
execute convert command
if(!is_array($argv)) $options
this class encapsulates the PHP mail() function.
__getDateSelect($a_type, $a_varname, $a_selected)
static getCurrentAcceptanceForUser(ilObjUser $user)
resetFilterObject()
Reset filter.
static _lookupDiskQuota($a_user_id)
Gets the disk quota info for the specified user account.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static formSelect($selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
Class ilObjectGUI Basic methods of all Output classes.
static _lookupObjId($a_id)
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
static Bytes2MB($a_value)
setSize($a_size)
Set Size.
This class represents a text property in a property form.
static formatDate(ilDateTime $date)
Format a date public.
redirection script todo: (a better solution should control the processing via a xml file) ...
static clear($a_var)
Unset a value.
editObject()
Display user edit form.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static _isExternalAccountEnabled()
Check if an external account name is required.
static getFilesizeByOwner($a_owner_id)
Get current storage size for owner.
static _getTranslation($a_role_title)
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static _lookupDiskUsage($a_user_id)
Gets the disk usage info for the specified user account.
TableGUI class for role assignment in user administration.
This class represents a non editable value in a property form.
static getAuthModeTranslation($a_auth_key)
setRows($a_rows)
Set Rows.
Create new PHPExcel object
obj_idprivate
static escapeShellArg($a_arg)
applyFilterObject()
Apply filter.
This class represents a text area property in a property form.
static _getPersonalPicturePath($a_usr_id, $a_size="small", $a_force_pic=false, $a_prevent_no_photo_image=false)
Get path to personal picture.
loadLanguageModule($a_module)
saveObject()
save user data public
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
const USER_FOLDER_ID
Class ilObjUserFolder.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
static formatSize($size, $a_mode='short', $a_lng=null)
Returns the specified file size value in a human friendly form.
__construct($a_data, $a_id, $a_call_by_reference=false, $a_prepare_output=true)
Constructor public.
setBackTarget($a_text, $a_link)
set back tab target
updateObject()
Update user.
static yn2tf($a_yn)
convert "y"/"n" to true/false
static getWebspaceDir($mode="filesystem")
get webspace directory
static _getInstance()
Get instance of ilSecuritySettings.
Class ilObjUserTrackingGUI.
roleassignmentObject()
display roleassignment panel
static getFilesizeByTypeAndOwner($a_owner_id)
Get current storage size for owner (grouped by type)