4 require_once
"./classes/class.ilObjectGUI.php";
5 include_once(
'./Services/Calendar/classes/class.ilDatePresentation.php');
47 function ilObjUserGUI($a_data,$a_id,$a_call_by_reference =
false, $a_prepare_output =
true)
51 define(
'USER_FOLDER_ID',7);
54 $this->
ilObjectGUI($a_data,$a_id,$a_call_by_reference,
false);
58 $this->ctrl->saveParameter($this, array(
'obj_id',
'letter'));
59 $this->ctrl->setParameterByClass(
"ilobjuserfoldergui",
"letter",
$_GET[
"letter"]);
61 $lng->loadLanguageModule(
'user');
65 $this->gender = array(
66 'm' =>
"salutation_m",
75 $next_class = $this->ctrl->getNextClass($this);
76 $cmd = $this->ctrl->getCmd();
82 case "illearningprogressgui":
83 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
85 $this->ctrl->forwardCommand($new_gui);
88 case "ilobjilincusergui":
89 include_once
'./Modules/ILinc/classes/class.ilObjiLincUserGUI.php';
91 $this->ctrl->forwardCommand($new_gui);
100 $return = $this->
$cmd();
111 if(strtolower(get_class($this->
object)) ==
'ilobjuser')
113 $this->tpl->setTitle(
'['.$this->object->getLogin().
'] '.$this->
object->getTitle());
114 $this->tpl->setDescription($this->object->getLongDescription());
115 $this->tpl->setTitleIcon(
ilUtil::getImagePath(
"icon_".$this->object->getType().
"_b.gif"), $this->lng->txt(
"obj_" . $this->object->getType()));
127 session_unregister(
"saved_post");
129 if(strtolower(
$_GET[
"baseClass"]) ==
'iladministrationgui')
131 $this->ctrl->redirectByClass(
"ilobjuserfoldergui",
"view");
137 $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
156 $tabs_gui->clearTargets();
160 $tabs_gui->setBackTarget(
161 $this->lng->txt(
"search_results"),
$_SESSION[
"usr_search_link"]);
163 $tabs_gui->addTarget(
"properties",
164 $this->ctrl->getLinkTarget($this,
"edit"), array(
"edit",
"",
"view"), get_class($this),
"",
true);
168 $tabs_gui->addTarget(
"properties",
169 $this->ctrl->getLinkTarget($this,
"edit"), array(
"edit",
"",
"view"), get_class($this));
172 $tabs_gui->addTarget(
"role_assignment",
173 $this->ctrl->getLinkTarget($this,
"roleassignment"), array(
"roleassignment"), get_class($this));
176 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
180 $tabs_gui->addTarget(
'learning_progress',
181 $this->ctrl->getLinkTargetByClass(
'illearningprogressgui',
''),
183 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui'));
186 if ($this->ilias->getSetting(
"ilinc_active"))
188 $tabs_gui->addTarget(
"extt_ilinc",
189 $this->ctrl->getLinkTargetByClass(
'ilobjilincusergui',
''),
191 array(
'ilobjilincusergui'));
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();
274 global
$tpl, $rbacsystem, $rbacreview, $ilUser;
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;
345 global
$tpl, $rbacsystem, $rbacreview, $ilUser;
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);
355 return $tpl->setContent($this->form_gui->getHtml());
366 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
369 if (!$ilAccess->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);
378 if ($this->form_gui->checkInput())
385 $userObj->setPasswd($this->form_gui->getInput(
'passwd'),
IL_PASSWD_PLAIN);
386 $userObj->setTitle($userObj->getFullname());
387 $userObj->setDescription($userObj->getEmail());
390 foreach(
$_POST as $k => $v)
392 if (substr($k, 0, 4) ==
"udf_")
394 $udf[substr($k, 4)] = $v;
397 $userObj->setUserDefinedData($udf);
401 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
404 $userObj->setExternalAccount(
$_POST[
"ext_account"]);
410 $userObj->setLastPasswordChangeTS( time() );
413 $userObj->saveAsNew();
418 $userObj->setLanguage(
$_POST[
"language"]);
422 require_once
'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
432 $sknst = explode(
":",
$_POST[
"skin_style"]);
434 if ($userObj->getPref(
"style") != $sknst[1] ||
435 $userObj->getPref(
"skin") != $sknst[0])
437 $userObj->setPref(
"skin", $sknst[0]);
438 $userObj->setPref(
"style", $sknst[1]);
443 $userObj->setPref(
"hits_per_page",
$_POST[
"hits_per_page"]);
447 $userObj->setPref(
"show_users_online",
$_POST[
"show_users_online"]);
451 $userObj->setPref(
"hide_own_online_status",
$_POST[
"hide_own_online_status"] ?
'y' :
'n');
453 if((
int)$ilSetting->get(
'session_reminder_enabled'))
455 $userObj->setPref(
'session_reminder_enabled', (
int)
$_POST[
'session_reminder_enabled']);
457 $userObj->writePrefs();
460 $rbacadmin->assignUser(
$_POST[
"default_role"],$userObj->getId(),
true);
462 $msg = $this->lng->txt(
"user_added");
464 $ilUser->setPref(
'send_info_mails', (
$_POST[
'send_mail'] ==
'y') ?
'y' :
'n');
465 $ilUser->writePrefs();
467 $this->
object = $userObj;
475 if(
$_POST[
'send_mail'] ==
'y')
477 include_once(
'Services/Mail/classes/class.ilAccountMail.php');
479 $acc_mail->useLangVariablesAsFallback(
true);
480 $acc_mail->setUserPassword(
$_POST[
'passwd']);
481 $acc_mail->setUser($userObj);
483 if ($acc_mail->send())
485 $msg = $msg.
'<br />'.$this->lng->txt(
'mail_sent');
490 $msg = $msg.
'<br />'.$this->lng->txt(
'mail_not_sent');
500 if(strtolower(
$_GET[
"baseClass"]) ==
'iladministrationgui')
502 $this->ctrl->redirectByClass(
"ilobjuserfoldergui",
"view");
506 $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
511 $this->form_gui->setValuesByPost();
512 $tpl->setContent($this->form_gui->getHtml());
523 global
$ilias, $rbacsystem, $rbacreview, $rbacadmin, $styleDefinition, $ilUser
526 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
529 $settings = $ilias->getAllSettings();
532 if($this->usrf_ref_id ==
USER_FOLDER_ID and !$rbacsystem->checkAccess(
'visible,read',$this->usrf_ref_id))
534 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
541 if(!$rbacsystem->checkAccess(
'cat_administrate_users',$this->object->getTimeLimitOwner()))
543 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
549 $this->tabs_gui->clearTargets();
555 $this->tpl->setContent($this->form_gui->getHTML());
583 $user->setTimeLimitUnlimited($this->form_gui->getInput(
'time_limit_unlimited'));
585 if($a_mode ==
'create')
587 $user->setTimeLimitOwner($this->usrf_ref_id);
593 $bd = $this->form_gui->getInput(
'birthday');
596 $user->setBirthday($bd[
'date']);
600 $user->setBirthday(null);
605 $user->setLogin($this->form_gui->getInput(
'login'));
611 $user->setGender($this->form_gui->getInput(
'gender'));
617 $user->setUTitle($this->form_gui->getInput(
'title'));
623 $user->setFirstname($this->form_gui->getInput(
'firstname'));
628 $user->setLastname($this->form_gui->getInput(
'lastname'));
630 $user->setFullname();
635 $user->setInstitution($this->form_gui->getInput(
'institution'));
641 $user->setDepartment($this->form_gui->getInput(
'department'));
646 $user->setStreet($this->form_gui->getInput(
'street'));
651 $user->setCity($this->form_gui->getInput(
'city'));
656 $user->setZipcode($this->form_gui->getInput(
'zipcode'));
661 $user->setCountry($this->form_gui->getInput(
'country'));
666 $user->setSelectedCountry($this->form_gui->getInput(
'sel_country'));
671 $user->setPhoneOffice($this->form_gui->getInput(
'phone_office'));
676 $user->setPhoneHome($this->form_gui->getInput(
'phone_home'));
681 $user->setPhoneMobile($this->form_gui->getInput(
'phone_mobile'));
686 $user->setFax($this->form_gui->getInput(
'fax'));
691 $user->setMatriculation($this->form_gui->getInput(
'matriculation'));
696 $user->setEmail($this->form_gui->getInput(
'email'));
701 $user->setHobby($this->form_gui->getInput(
'hobby'));
706 $user->setComment($this->form_gui->getInput(
'referral_comment'));
709 $user->setClientIP($this->form_gui->getInput(
'client_ip'));
713 $user->setInstantMessengerId(
'icq', $this->form_gui->getInput(
'im_icq'));
714 $user->setInstantMessengerId(
'yahoo', $this->form_gui->getInput(
'im_yahoo'));
715 $user->setInstantMessengerId(
'msn', $this->form_gui->getInput(
'im_msn'));
716 $user->setInstantMessengerId(
'aim', $this->form_gui->getInput(
'im_aim'));
717 $user->setInstantMessengerId(
'skype', $this->form_gui->getInput(
'im_skype'));
718 $user->setInstantMessengerId(
'jabber', $this->form_gui->getInput(
'im_jabber'));
719 $user->setInstantMessengerId(
'voip', $this->form_gui->getInput(
'im_voip'));
724 $user->setDelicious($this->form_gui->getInput(
'delicious'));
727 $user->setLatitude($this->form_gui->getInput(
'latitude'));
728 $user->setLongitude($this->form_gui->getInput(
'longitude'));
729 $user->setLocationZoom($this->form_gui->getInput(
'loc_zoom'));
732 $user->setAuthMode($this->form_gui->getInput(
'auth_mode'));
733 $user->setExternalAccount($this->form_gui->getInput(
'ext_account'));
735 if((
int)
$user->getActive() != (int) $this->form_gui->getInput(
'active'))
737 $user->setActive($this->form_gui->getInput(
'active'), $ilUser->getId());
752 if($this->usrf_ref_id ==
USER_FOLDER_ID and !$rbacsystem->checkAccess(
'visible,read,write',$this->usrf_ref_id))
754 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
761 if(!$rbacsystem->checkAccess(
'cat_administrate_users',$this->object->getTimeLimitOwner()))
763 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
769 unset(
$_POST[
'approve_date']);
770 $_POST[
'agree_date'] = $this->
object->getAgreeDate();
771 unset(
$_POST[
'last_login']);
773 if ($this->form_gui->checkInput())
778 && trim(
$_POST[
'passwd']) !=
"")
784 require_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
786 if( $security_settings->getAccountSecurityMode() ==
793 if(
$_POST[
'active'] == 1 )
798 #$this->object->assignData($_POST);
802 foreach(
$_POST as $k => $v)
804 if (substr($k, 0, 4) ==
"udf_")
806 $udf[substr($k, 4)] = $v;
809 $this->
object->setUserDefinedData($udf);
813 $this->
object->updateLogin(
$_POST[
'login']);
818 $this->form_gui->setValuesByPost();
819 return $tpl->setContent($this->form_gui->getHtml());
822 $this->
object->setTitle($this->object->getFullname());
823 $this->
object->setDescription($this->object->getEmail());
827 $this->
object->setLanguage($this->form_gui->getInput(
'language'));
830 require_once
'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
840 $sknst = explode(
":",
$_POST[
"skin_style"]);
842 if ($this->object->getPref(
"style") != $sknst[1] ||
843 $this->
object->getPref(
"skin") != $sknst[0])
845 $this->
object->setPref(
"skin", $sknst[0]);
846 $this->
object->setPref(
"style", $sknst[1]);
851 $this->
object->setPref(
"hits_per_page",
$_POST[
"hits_per_page"]);
855 $this->
object->setPref(
"show_users_online",
$_POST[
"show_users_online"]);
859 $this->
object->setPref(
"hide_own_online_status",
$_POST[
"hide_own_online_status"] ?
'y' :
'n');
865 $this->
object->setLastPasswordChangeTS( time() );
868 if((
int)$ilSetting->get(
'session_reminder_enabled'))
870 $this->
object->setPref(
'session_reminder_enabled', (
int)
$_POST[
'session_reminder_enabled']);
874 $this->update = $this->
object->update();
879 if ($ilUser->getId() == $this->
object->getId())
881 $ilUser->readPrefs();
883 $ilUser->setPref(
'send_info_mails', (
$_POST[
'send_mail'] ==
'y') ?
'y' :
'n');
884 $ilUser->writePrefs();
887 $msg = $this->lng->txt(
'saved_successfully').$mail_message;
898 if (strtolower(
$_GET[
"baseClass"]) ==
'iladministrationgui')
900 $this->ctrl->redirectByClass(
"ilobjuserfoldergui",
"view");
904 $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
909 $this->form_gui->setValuesByPost();
910 $tpl->setContent($this->form_gui->getHtml());
924 $data[
"auth_mode"] = $this->
object->getAuthMode();
925 $data[
"login"] = $this->
object->getLogin();
928 $data[
"ext_account"] = $this->
object->getExternalAccount();
931 require_once
'classes/class.ilFormat.php';
934 $data[
"approve_date"] = ($this->
object->getApproveDate() !=
"")
937 $data[
"agree_date"] = ($this->
object->getAgreeDate() !=
"")
940 $data[
"last_login"] = ($this->
object->getLastLogin() !=
"")
943 $data[
"active"] = $this->
object->getActive();
944 $data[
"time_limit_unlimited"] = $this->
object->getTimeLimitUnlimited();
946 $from =
new ilDateTime($this->object->getTimeLimitFrom() ? $this->
object->getTimeLimitFrom() : time(),
IL_CAL_UNIX);
947 $data[
"time_limit_from"][
"date"] = $from->
get(
IL_CAL_FKT_DATE,
'Y-m-d',$ilUser->getTimeZone());
948 $data[
"time_limit_from"][
"time"] = $from->
get(
IL_CAL_FKT_DATE,
'H:i:s',$ilUser->getTimeZone());
950 $until =
new ilDateTime($this->object->getTimeLimitUntil() ? $this->
object->getTimeLimitUntil() : time(),
IL_CAL_UNIX);
951 $data[
'time_limit_until'][
'date'] = $until->
get(
IL_CAL_FKT_DATE,
'Y-m-d',$ilUser->getTimeZone());
952 $data[
'time_limit_until'][
'time'] = $until->
get(
IL_CAL_FKT_DATE,
'H:i:s',$ilUser->getTimeZone());
956 require_once
'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
981 $data[
"gender"] = $this->
object->getGender();
982 $data[
"firstname"] = $this->
object->getFirstname();
983 $data[
"lastname"] = $this->
object->getLastname();
984 $data[
"title"] = $this->
object->getUTitle();
985 $data[
'birthday'] = $this->
object->getBirthday();
986 $data[
"institution"] = $this->
object->getInstitution();
987 $data[
"department"] = $this->
object->getDepartment();
988 $data[
"street"] = $this->
object->getStreet();
989 $data[
"city"] = $this->
object->getCity();
990 $data[
"zipcode"] = $this->
object->getZipcode();
991 $data[
"country"] = $this->
object->getCountry();
992 $data[
"sel_country"] = $this->
object->getSelectedCountry();
993 $data[
"phone_office"] = $this->
object->getPhoneOffice();
994 $data[
"phone_home"] = $this->
object->getPhoneHome();
995 $data[
"phone_mobile"] = $this->
object->getPhoneMobile();
996 $data[
"fax"] = $this->
object->getFax();
997 $data[
"email"] = $this->
object->getEmail();
998 $data[
"hobby"] = $this->
object->getHobby();
999 $data[
"referral_comment"] = $this->
object->getComment();
1002 $data[
"im_icq"] = $this->
object->getInstantMessengerId(
'icq');
1003 $data[
"im_yahoo"] = $this->
object->getInstantMessengerId(
'yahoo');
1004 $data[
"im_msn"] = $this->
object->getInstantMessengerId(
'msn');
1005 $data[
"im_aim"] = $this->
object->getInstantMessengerId(
'aim');
1006 $data[
"im_skype"] = $this->
object->getInstantMessengerId(
'skype');
1007 $data[
"im_jabber"] = $this->
object->getInstantMessengerId(
'jabber');
1008 $data[
"im_voip"] = $this->
object->getInstantMessengerId(
'voip');
1011 $data[
"matriculation"] = $this->
object->getMatriculation();
1012 $data[
"delicious"] = $this->
object->getDelicious();
1013 $data[
"client_ip"] = $this->
object->getClientIP();
1016 include_once
'./Services/User/classes/class.ilUserDefinedFields.php';
1018 $user_defined_data = $this->
object->getUserDefinedData();
1019 foreach($this->user_defined_fields->getDefinitions() as $field_id => $definition)
1021 $data[
"udf_".$field_id] = $user_defined_data[
"f_".$field_id];
1025 $data[
"language"] = $this->
object->getLanguage();
1026 $data[
"skin_style"] = $this->
object->skin.
":".$this->
object->prefs[
"style"];
1027 $data[
"hits_per_page"] = $this->
object->prefs[
"hits_per_page"];
1028 $data[
"show_users_online"] = $this->
object->prefs[
"show_users_online"];
1029 $data[
"hide_own_online_status"] = $this->
object->prefs[
"hide_own_online_status"] ==
'y';
1030 $data[
"session_reminder_enabled"] = (int)$this->object->prefs[
"session_reminder_enabled"];
1032 $this->form_gui->setValuesByArray($data);
1042 $settings = $ilSetting->getAll();
1044 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1047 $this->form_gui->setFormAction($ilCtrl->getFormAction($this));
1048 if ($a_mode ==
"create")
1050 $this->form_gui->setTitle($lng->txt(
"usr_new"));
1054 $this->form_gui->setTitle($lng->txt(
"usr_edit"));
1059 $sec_l->setTitle($lng->txt(
"login_data"));
1060 $this->form_gui->addItem($sec_l);
1063 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
1067 foreach ($active_auth_modes as $auth_name => $auth_key)
1069 if ($auth_name ==
'default')
1075 $name = $this->lng->txt(
'auth_'.$auth_name);
1077 $option[$auth_name] = $name;
1080 $this->form_gui->addItem($am);
1085 if ($a_mode ==
"edit")
1087 $lo->setCurrentUserId($this->object->getId());
1090 include_once
'Services/Calendar/classes/class.ilDate.php';
1095 $this->lng->txt(
'usr_loginname_history_info'),
1097 $last_history_entry[0]
1104 $this->form_gui->addItem($lo);
1112 $pw->setMaxLength(32);
1113 $pw->setValidateAuthPost(
"auth_mode");
1114 if ($a_mode ==
"create")
1116 $pw->setRequiredOnAuth(
true);
1119 $this->form_gui->addItem($pw);
1124 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
1127 $ext =
new ilTextInputGUI($lng->txt(
"user_ext_account"),
"ext_account");
1129 $ext->setMaxLength(50);
1130 $ext->setInfo($lng->txt(
"user_ext_account_desc"));
1131 $this->form_gui->addItem($ext);
1136 $sec_si->setTitle($this->lng->txt(
"system_information"));
1137 $this->form_gui->addItem($sec_si);
1140 if ($a_mode ==
"edit")
1142 $sia = array(
"create_date",
"approve_date",
"agree_date",
"last_login",
"owner");
1146 $this->form_gui->addItem($siai);
1153 $this->form_gui->addItem($ac);
1156 $lng->loadLanguageModule(
'crs');
1161 $op1 =
new ilRadioOption($lng->txt(
"user_access_unlimited"), 1);
1162 $radg->addOption($op1);
1163 $op2 =
new ilRadioOption($lng->txt(
"user_access_limited"), 0);
1164 $radg->addOption($op2);
1174 $op2->addSubItem($acfrom);
1180 $op2->addSubItem($acto);
1183 $this->form_gui->addItem($radg);
1185 require_once
'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
1189 $disk_quota =
new ilTextInputGUI($lng->txt(
"disk_quota"),
"disk_quota");
1191 $disk_quota->setMaxLength(11);
1192 $disk_quota->setInfo($this->lng->txt(
"enter_in_mb_desc"));
1193 $this->form_gui->addItem($disk_quota);
1195 if ($a_mode ==
"edit")
1198 require_once
'Services/WebDAV/classes/class.ilDiskQuotaChecker.php';
1200 if ($dq_info[
'user_disk_quota'] > $dq_info[
'role_disk_quota'])
1202 $info_text = sprintf($lng->txt(
'disk_quota_is_1_instead_of_2_by_3'),
1205 $dq_info[
'role_title']);
1207 else if (is_infinite($dq_info[
'role_disk_quota']))
1209 $info_text = sprintf($lng->txt(
'disk_quota_is_unlimited_by_1'), $dq_info[
'role_title']);
1213 $info_text = sprintf($lng->txt(
'disk_quota_is_1_by_2'),
1215 $dq_info[
'role_title']);
1217 $disk_quota->setInfo($this->lng->txt(
"enter_in_mb_desc").
'<br>'.$info_text);
1223 if ($du_info[
'last_update'] === null)
1225 $disk_usage->
setValue($lng->txt(
'unknown'));
1229 require_once
'classes/class.ilFormat.php';
1233 foreach ($du_info[
'details'] as $detail_data)
1236 '<td>'.$detail_data[
'count'].
'</td>'.
1237 '<td>'.$lng->txt($detail_data[
'type']).
'</td>'.
1238 '<td>'.ilFormat::formatSize($detail_data[
'size'],
'short').
'</td>'.
1242 $info .=
'</table>';
1243 $info .=
'<br>'.$this->lng->txt(
'last_update').
': '.
1245 $disk_usage->setInfo($info);
1248 $this->form_gui->addItem($disk_usage);
1251 if (
true || $dq_info[
'last_reminder'])
1257 $reminder->setInfo($this->lng->txt(
"disk_quota_last_reminder_sent_desc"));
1258 $this->form_gui->addItem($reminder);
1275 $sec_pd->setTitle($this->lng->txt(
"personal_data"));
1276 $this->form_gui->addItem($sec_pd);
1283 $gndr->
setRequired(isset($settings[
"require_gender"]) && $settings[
"require_gender"]);
1285 $gndr->addOption($female);
1287 $gndr->addOption($male);
1288 $this->form_gui->addItem($gndr);
1292 $fields = array(
"firstname" =>
true,
"lastname" =>
true,
1293 "title" => isset($settings[
"require_title"]) && $settings[
"require_title"]);
1294 foreach($fields as $field => $req)
1300 $inp->setMaxLength(32);
1301 $inp->setRequired($req);
1302 $this->form_gui->addItem($inp);
1310 if ($a_mode ==
"edit" || $a_mode ==
"upload")
1315 $this->form_gui->addItem($pi);
1321 $birthday->
setRequired(isset($settings[
"require_birthday"]) && $settings[
"require_birthday"]);
1322 $birthday->setShowEmpty(
true);
1323 $birthday->setStartYear(1900);
1324 $this->form_gui->addItem($birthday);
1331 array(
"institution", 40, 80),
1332 array(
"department", 40, 80),
1333 array(
"street", 40, 40),
1334 array(
"city", 40, 40),
1335 array(
"zipcode", 10, 10),
1336 array(
"country", 40, 40),
1337 array(
"sel_country"),
1338 array(
"phone_office", 30, 30),
1339 array(
"phone_home", 30, 30),
1340 array(
"phone_mobile", 30, 30),
1341 array(
"fax", 30, 30));
1344 foreach ($fields as $field)
1350 $sec_cd->setTitle($this->lng->txt(
"contact_data"));
1351 $this->form_gui->addItem($sec_cd);
1355 if ($field[0] !=
"sel_country")
1359 $inp->setMaxLength($field[2]);
1360 $inp->setRequired(isset($settings[
"require_".$field[0]]) &&
1361 $settings[
"require_".$field[0]]);
1362 $this->form_gui->addItem($inp);
1367 include_once(
"./Services/Form/classes/class.ilCountrySelectInputGUI.php");
1369 $cs->
setRequired(isset($settings[
"require_".$field[0]]) &&
1370 $settings[
"require_".$field[0]]);
1371 $this->form_gui->addItem($cs);
1380 $em->
setRequired(isset($settings[
"require_email"]) &&
1381 $settings[
"require_email"]);
1382 $this->form_gui->addItem($em);
1391 $hob->setRequired(isset($settings[
"require_hobby"]) &&
1392 $settings[
"require_hobby"]);
1393 $this->form_gui->addItem($hob);
1402 $rc->setRequired(isset($settings[
"require_referral_comment"]) &&
1403 $settings[
"require_referral_comment"]);
1404 $this->form_gui->addItem($rc);
1411 $sec_im->setTitle($this->lng->txt(
"instant_messengers"));
1412 $this->form_gui->addItem($sec_im);
1416 $fields = array(
"icq",
"yahoo",
"msn",
"aim",
"skype",
"jabber",
"voip");
1417 foreach ($fields as $field)
1423 $im->setMaxLength(40);
1424 $this->form_gui->addItem($im);
1432 $sec_oi->setTitle($this->lng->txt(
"user_profile_other"));
1433 $this->form_gui->addItem($sec_oi);
1439 $mr =
new ilTextInputGUI($lng->txt(
"matriculation"),
"matriculation");
1441 $mr->setMaxLength(40);
1442 $mr->setRequired(isset($settings[
"require_matriculation"]) &&
1443 $settings[
"require_matriculation"]);
1444 $this->form_gui->addItem($mr);
1452 $mr->setMaxLength(40);
1453 $mr->setRequired(isset($settings[
"require_delicious"]) &&
1454 $settings[
"require_delicious"]);
1455 $this->form_gui->addItem($mr);
1461 $ip->setMaxLength(255);
1462 $ip->setInfo($this->lng->txt(
"current_ip").
" ".$_SERVER[
"REMOTE_ADDR"].
" <br />".
1463 '<small class="warning">'.$this->lng->txt(
"current_ip_alert").
"</span>");
1464 $this->form_gui->addItem($ip);
1467 include_once
'./Services/User/classes/class.ilUserDefinedFields.php';
1472 $all_defs = $user_defined_fields->getDefinitions();
1476 $all_defs = $user_defined_fields->getChangeableLocalUserAdministrationDefinitions();
1479 foreach($all_defs as $field_id => $definition)
1484 "udf_".$definition[
'field_id']);
1486 $udf->setMaxLength(255);
1491 "udf_".$definition[
'field_id']);
1492 $udf->setUseRte(
true);
1497 "udf_".$definition[
'field_id']);
1498 $udf->setOptions($user_defined_fields->fieldValuesToSelectArray(
1499 $definition[
'field_values']));
1501 $udf->setRequired($definition[
'required']);
1502 $this->form_gui->addItem($udf);
1507 $a_mode ==
'create' or
1515 $sec_st->setTitle($this->lng->txt(
"settings"));
1516 $this->form_gui->addItem($sec_st);
1520 if ($a_mode ==
"create")
1525 $role->setValue($this->default_role);
1526 $role->setOptions($this->selectable_roles);
1527 $this->form_gui->addItem($role);
1535 $languages = $this->lng->getInstalledLanguages();
1537 foreach($languages as $l)
1539 $options[$l] = $lng->txt(
"lang_".$l);
1541 $lang->setOptions($options);
1542 $lang->setValue($ilSetting->get(
"language"));
1543 $this->form_gui->addItem(
$lang);
1551 $templates = $styleDefinition->getAllTemplates();
1552 include(
"./Services/Style/classes/class.ilObjStyleSettings.php");
1554 if (count($templates) > 0 && is_array ($templates))
1556 foreach ($templates as $template)
1559 $styleDef->startParsing();
1560 $styles = $styleDef->getStyles();
1561 foreach ($styles as $style)
1567 $options[$template[
"id"].
":".$style[
"id"]] =
1568 $styleDef->getTemplateName().
" / ".$style[
"name"];
1572 $sk->setOptions($options);
1573 $sk->setValue($ilClientIniFile->readVariable(
"layout",
"skin").
1574 ":".$ilClientIniFile->readVariable(
"layout",
"style"));
1576 $this->form_gui->addItem($sk);
1584 $options = array(10 => 10, 15 => 15, 20 => 20, 30 => 30, 40 => 40,
1585 50 => 50, 100 => 100, 9999 => $this->lng->txt(
"no_limit"));
1587 $hpp->setValue($ilSetting->get(
"hits_per_page"));
1588 $this->form_gui->addItem($hpp);
1592 'show_users_online');
1594 "y" => $lng->txt(
"users_online_show_y"),
1595 "associated" => $lng->txt(
"users_online_show_associated"),
1596 "n" => $lng->txt(
"users_online_show_n"));
1598 $uo->setValue($ilSetting->get(
"show_users_online"));
1599 $this->form_gui->addItem($uo);
1605 $os =
new ilCheckboxInputGUI($lng->txt(
"hide_own_online_status"),
"hide_own_online_status");
1606 $this->form_gui->addItem($os);
1613 $sec_op->setTitle($this->lng->txt(
"options"));
1614 $this->form_gui->addItem($sec_op);
1620 $se->setChecked(($ilUser->getPref(
'send_info_mails') ==
'y'));
1621 $this->form_gui->addItem($se);
1623 if((
int)$ilSetting->get(
'session_reminder_enabled'))
1625 $cb =
new ilCheckboxInputGUI($this->lng->txt(
'session_reminder'),
'session_reminder_enabled');
1627 $this->form_gui->addItem($cb);
1633 if ($a_mode ==
"create" || $a_mode ==
"save")
1635 $this->form_gui->addCommandButton(
"save", $lng->txt(
"save"));
1637 if ($a_mode ==
"edit" || $a_mode ==
"update")
1639 $this->form_gui->addCommandButton(
"update", $lng->txt(
"save"));
1641 $this->form_gui->addCommandButton(
"cancel", $lng->txt(
"cancel"));
1657 static $settings = null;
1666 if($settings == NULL)
1668 $settings = $ilSetting->getAll();
1670 return (
bool) $settings[
'usr_settings_changeable_lua_'.$a_field];
1680 global
$ilias, $rbacsystem, $rbacreview, $rbacadmin, $styleDefinition, $ilUser
1683 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
1687 $settings = $ilias->getAllSettings();
1690 if($this->usrf_ref_id ==
USER_FOLDER_ID and !$rbacsystem->checkAccess(
'visible,read',$this->usrf_ref_id))
1692 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
1699 if(!$rbacsystem->checkAccess(
'cat_administrate_users',$this->object->getTimeLimitOwner()))
1701 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
1707 $this->tabs_gui->clearTargets();
1711 $data[
"fields"] = array();
1712 $data[
"fields"][
"login"] = $this->
object->getLogin();
1713 $data[
"fields"][
"passwd"] =
"********";
1714 #$data["fields"]["passwd2"] = "********"; // will not be saved
1715 $data[
"fields"][
"ext_account"] = $this->
object->getExternalAccount();
1716 $data[
"fields"][
"title"] = $this->
object->getUTitle();
1717 $data[
"fields"][
"gender"] = $this->
object->getGender();
1718 $data[
"fields"][
"firstname"] = $this->
object->getFirstname();
1719 $data[
"fields"][
"lastname"] = $this->
object->getLastname();
1720 $data[
"fields"][
"institution"] = $this->
object->getInstitution();
1721 $data[
"fields"][
"department"] = $this->
object->getDepartment();
1722 $data[
"fields"][
"street"] = $this->
object->getStreet();
1723 $data[
"fields"][
"city"] = $this->
object->getCity();
1724 $data[
"fields"][
"zipcode"] = $this->
object->getZipcode();
1725 $data[
"fields"][
"country"] = $this->
object->getCountry();
1726 $data[
"fields"][
"sel_country"] = $this->
object->getSelectedCountry();
1727 $data[
"fields"][
"phone_office"] = $this->
object->getPhoneOffice();
1728 $data[
"fields"][
"phone_home"] = $this->
object->getPhoneHome();
1729 $data[
"fields"][
"phone_mobile"] = $this->
object->getPhoneMobile();
1730 $data[
"fields"][
"fax"] = $this->
object->getFax();
1731 $data[
"fields"][
"email"] = $this->
object->getEmail();
1732 $data[
"fields"][
"hobby"] = $this->
object->getHobby();
1733 $data[
"fields"][
"im_icq"] = $this->
object->getInstantMessengerId(
'icq');
1734 $data[
"fields"][
"im_yahoo"] = $this->
object->getInstantMessengerId(
'yahoo');
1735 $data[
"fields"][
"im_msn"] = $this->
object->getInstantMessengerId(
'msn');
1736 $data[
"fields"][
"im_aim"] = $this->
object->getInstantMessengerId(
'aim');
1737 $data[
"fields"][
"im_skype"] = $this->
object->getInstantMessengerId(
'skype');
1738 $data[
"fields"][
"im_jabber"] = $this->
object->getInstantMessengerId(
'jabber');
1739 $data[
"fields"][
"im_voip"] = $this->
object->getInstantMessengerId(
'voip');
1740 $data[
"fields"][
"matriculation"] = $this->
object->getMatriculation();
1741 $data[
"fields"][
"client_ip"] = $this->
object->getClientIP();
1742 $data[
"fields"][
"referral_comment"] = $this->
object->getComment();
1744 $data[
"fields"][
"create_date"] = $this->
object->getCreateDate();
1745 $data[
"fields"][
"approve_date"] = $this->
object->getApproveDate();
1746 $data[
"fields"][
"agree_date"] = $this->
object->getAgreeDate();
1747 $data[
"fields"][
"last_login"] = $this->
object->getLastLogin();
1748 $data[
"fields"][
"active"] = $this->
object->getActive();
1749 $data[
"fields"][
"auth_mode"] = $this->
object->getAuthMode();
1750 $data[
"fields"][
"ext_account"] = $this->
object->getExternalAccount();
1753 $this->tpl->setVariable(
"TXT_UPLOAD",$this->lng->txt(
"personal_picture"));
1755 $full_img = $this->
object->getPref(
"profile_image");
1756 $last_dot = strrpos($full_img,
".");
1757 $small_img = substr($full_img, 0, $last_dot).
1758 "_small".substr($full_img, $last_dot, strlen($full_img) - $last_dot);
1759 $image_file = $webspace_dir.
"/usr_images/".$small_img;
1760 if (@is_file($image_file))
1762 $this->tpl->setVariable(
"IMG_PERSONAL", $image_file.
"?dummy=".rand(1,99999));
1763 $this->tpl->setVariable(
"ALT_IMG_PERSONAL",$this->lng->txt(
"personal_picture"));
1764 $this->tpl->setVariable(
"TXT_REMOVE_PIC", $this->lng->txt(
"remove_personal_picture"));
1767 $this->tpl->setVariable(
"UPLOAD", $this->lng->txt(
"upload"));
1768 $this->tpl->setVariable(
"TXT_FILE", $this->lng->txt(
"userfile"));
1769 $this->tpl->setVariable(
"USER_FILE", $this->lng->txt(
"user_file"));
1794 $user_is_online =
false;
1798 $user_is_online =
true;
1801 preg_match(
"/RoleId.*?;\}/",$user_online[$this->object->getId()][
"data"],$matches);
1803 $active_roles = unserialize(substr($matches[0],7));
1806 $assigned_roles = $rbacreview->assignedRoles($this->object->getId());
1808 foreach ($assigned_roles as $key => $role)
1810 $roleObj = $this->ilias->obj_factory->getInstanceByObjId($role);
1813 $rolf = $rbacreview->getFoldersAssignedToRole($role,
true);
1816 if (count($rolf) > 0)
1818 if (!$rbacreview->isDeleted($rolf[0]))
1822 if ($this->tree->isInTree($rolf[0]))
1824 $tmpPath = $this->tree->getPathFull($rolf[0]);
1827 for ($i = 0; $i < (count($tmpPath)-1); $i++)
1834 $path .= $tmpPath[$i][
"title"];
1839 $path =
"<b>Rolefolder ".$rolf[0].
" not found in tree! (Role ".$role.
")</b>";
1841 $active_roles = $active_roles ? $active_roles : array();
1842 if (in_array($role,$active_roles))
1844 $data[
"active_role"][$role][
"active"] =
true;
1847 $data[
"active_role"][$role][
"title"] = $roleObj->getTitle();
1848 $data[
"active_role"][$role][
"context"] =
$path;
1855 $path =
"<b>No role folder found for role ".$role.
"!</b>";
1863 if (isset(
$_SESSION[
"error_post_vars"][
"Fobject"]))
1865 if (!isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"active"]))
1867 $_SESSION[
"error_post_vars"][
"Fobject"][
"active"] = 0;
1870 foreach (
$_SESSION[
"error_post_vars"][
"Fobject"] as $key => $val)
1872 $str = $this->lng->txt($key);
1873 if ($key ==
"title")
1875 $str = $this->lng->txt(
"person_title");
1877 if($key ==
'passwd2')
1881 if($key ==
'passwd')
1886 $this->tpl->setCurrentBlock(
'passwords_visible');
1887 $this->tpl->setVariable(
'VISIBLE_TXT_PASSWD',$this->lng->txt(
'passwd'));
1888 $this->tpl->setVariable(
'VISIBLE_TXT_PASSWD2',$this->lng->txt(
'retype_password'));
1889 $this->tpl->setVariable(
'VISIBLE_PASSWD',
$_SESSION[
'error_post_vars'][
'Fobject'][
'passwd']);
1890 $this->tpl->setVariable(
'VISIBLE_PASSWD2',
$_SESSION[
'error_post_vars'][
'Fobject'][
'passwd2']);
1891 $this->tpl->parseCurrentBlock();
1895 $this->tpl->setCurrentBlock(
'passwords_invisible');
1896 $this->tpl->setVariable(
'INVISIBLE_TXT_PASSWD',$this->lng->txt(
'passwd'));
1897 $this->tpl->setVariable(
'INVISIBLE_TXT_PASSWD2',$this->lng->txt(
'retype_password'));
1898 $this->tpl->setVariable(
'INVISIBLE_PASSWD',strlen($this->object->getPasswd()) ?
1901 $this->tpl->setVariable(
'INVISIBLE_PASSWD2',strlen($this->object->getPasswd()) ?
1904 $this->tpl->setVariable(
'INVISIBLE_PASSWD_HIDDEN',
"********");
1905 $this->tpl->parseCurrentBlock();
1912 if (isset($settings[
"require_" . $key]) && $settings[
"require_" . $key])
1914 $str = $str .
'<span class="asterisk">*</span>';
1917 $this->tpl->setVariable(
"TXT_".strtoupper($key), $str);
1919 if ($key !=
"default_role" and $key !=
"language"
1920 and $key !=
"skin_style" and $key !=
"hits_per_page"
1921 and $key !=
"show_users_online")
1933 $this->tpl->setVariable(
"BTN_GENDER_".
$gender,
"checked=\"checked\"");
1936 $active =
$_SESSION[
"error_post_vars"][
"Fobject"][
"active"];
1939 $this->tpl->setVariable(
"ACTIVE",
"checked=\"checked\"");
1944 if (!isset($data[
"fields"][
"active"]))
1946 $data[
"fields"][
"active"] = 0;
1949 foreach ($data[
"fields"] as $key => $val)
1951 $str = $this->lng->txt($key);
1952 if ($key ==
"title")
1954 $str = $this->lng->txt(
"person_title");
1956 if ($key ==
"ext_account")
1960 if($key ==
'passwd')
1962 $auth_mode = $this->
object->getAuthMode(
true);
1965 $this->tpl->setCurrentBlock(
'passwords_visible');
1966 $this->tpl->setVariable(
'VISIBLE_TXT_PASSWD',$this->lng->txt(
'passwd'));
1967 $this->tpl->setVariable(
'VISIBLE_TXT_PASSWD2',$this->lng->txt(
'retype_password'));
1968 $this->tpl->setVariable(
'VISIBLE_PASSWD',
"********");
1969 $this->tpl->setVariable(
'VISIBLE_PASSWD2',
"********");
1970 $this->tpl->parseCurrentBlock();
1974 $this->tpl->setCurrentBlock(
'passwords_invisible');
1975 $this->tpl->setVariable(
'INVISIBLE_TXT_PASSWD',$this->lng->txt(
'passwd'));
1976 $this->tpl->setVariable(
'INVISIBLE_TXT_PASSWD2',$this->lng->txt(
'retype_password'));
1977 $this->tpl->setVariable(
'INVISIBLE_PASSWD',strlen($this->object->getPasswd()) ?
1980 $this->tpl->setVariable(
'INVISIBLE_PASSWD2',strlen($this->object->getPasswd()) ?
1983 $this->tpl->setVariable(
'INVISIBLE_PASSWD_HIDDEN',
"********");
1984 $this->tpl->parseCurrentBlock();
1990 if (isset($settings[
"require_" . $key]) && $settings[
"require_" . $key])
1992 $str = $str .
'<span class="asterisk">*</span>';
1995 $this->tpl->setVariable(
"TXT_".strtoupper($key), $str);
1998 #$this->tpl->parseCurrentBlock();
2002 $gender = strtoupper($data[
"fields"][
"gender"]);
2006 $this->tpl->setVariable(
"BTN_GENDER_".
$gender,
"checked=\"checked\"");
2009 $active = $data[
"fields"][
"active"];
2012 $this->tpl->setVariable(
"ACTIVE",
"checked=\"checked\"");
2017 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
2020 $this->tpl->setCurrentBlock(
"ext_account");
2021 $this->tpl->setVariable(
"TXT_EXT_ACCOUNT",$this->lng->txt(
"user_ext_account"));
2022 $this->tpl->setVariable(
"TXT_EXT_ACCOUNT_DESC",$this->lng->txt(
"user_ext_account_desc"));
2023 if (isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"ext_account"]))
2025 $this->tpl->setVariable(
"EXT_ACCOUNT_VAL",
2026 $_SESSION[
"error_post_vars"][
"Fobject"][
"ext_account"]);
2030 $this->tpl->setVariable(
"EXT_ACCOUNT_VAL",
2031 $data[
"fields"][
"ext_account"]);
2042 $this->tpl->parseCurrentBlock();
2044 $auth_mode =
$_SESSION[
'error_post_vars'][
'Fobject'][
'auth_mode'] ?
2046 $this->
object->getAuthMode(
true);
2049 $this->tpl->setVariable(
"OPTION_DISABLED",
"\"disabled=disabled\"");
2051 $obj_str = ($this->call_by_reference) ?
"" :
"&obj_id=".$this->obj_id;
2053 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
2054 $this->tpl->setVariable(
"TXT_HEADER", $this->lng->txt($this->object->getType().
"_edit"));
2055 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
2056 $this->tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"save"));
2057 $this->tpl->setVariable(
"CMD_SUBMIT",
"update");
2058 $this->tpl->setVariable(
"TARGET", $this->
getTargetFrame(
"update"));
2059 $this->tpl->setVariable(
"TXT_REQUIRED_FLD", $this->lng->txt(
"required_field"));
2061 $this->tpl->setVariable(
"TXT_LOGIN_DATA", $this->lng->txt(
"login_data"));
2062 $this->tpl->setVariable(
"TXT_SYSTEM_INFO", $this->lng->txt(
"system_information"));
2063 $this->tpl->setVariable(
"TXT_PERSONAL_DATA", $this->lng->txt(
"personal_data"));
2064 $this->tpl->setVariable(
"TXT_CONTACT_DATA", $this->lng->txt(
"contact_data"));
2065 $this->tpl->setVariable(
"TXT_SETTINGS", $this->lng->txt(
"settings"));
2066 $this->tpl->setVariable(
"TXT_LANGUAGE",$this->lng->txt(
"language"));
2067 $this->tpl->setVariable(
"TXT_SKIN_STYLE",$this->lng->txt(
"usr_skin_style"));
2068 $this->tpl->setVariable(
"TXT_HITS_PER_PAGE",$this->lng->txt(
"hits_per_page"));
2069 $this->tpl->setVariable(
"TXT_SHOW_USERS_ONLINE",$this->lng->txt(
"show_users_online"));
2070 $this->tpl->setVariable(
"TXT_GENDER_F",$this->lng->txt(
"gender_f"));
2071 $this->tpl->setVariable(
"TXT_GENDER_M",$this->lng->txt(
"gender_m"));
2072 $this->tpl->setVariable(
"TXT_INSTANT_MESSENGERS",$this->lng->txt(
"user_profile_instant_messengers"));
2073 $this->tpl->setVariable(
"TXT_OTHER",$this->lng->txt(
"user_profile_other"));
2074 if ($this->object->getId() == $ilUser->getId())
2076 $this->tpl->setVariable(
"TXT_CURRENT_IP",
"(".$this->lng->txt(
"current_ip").
" ".$_SERVER[
"REMOTE_ADDR"].
")");
2078 $this->tpl->setVariable(
"TXT_CURRENT_IP_ALERT",$this->lng->txt(
"current_ip_alert"));
2081 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
2085 $selected_auth_mode = (isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"auth_mode"])) ?
$_SESSION[
"error_post_vars"][
"Fobject"][
"auth_mode"] : $this->object->getAuthMode();
2087 foreach ($active_auth_modes as $auth_name => $auth_key)
2089 $this->tpl->setCurrentBlock(
"auth_mode_selection");
2091 if ($auth_name ==
'default')
2097 $name = $this->lng->txt(
'auth_'.$auth_name);
2100 $this->tpl->setVariable(
"AUTH_MODE_NAME", $name);
2102 $this->tpl->setVariable(
"AUTH_MODE", $auth_name);
2104 if ($selected_auth_mode == $auth_name)
2106 $this->tpl->setVariable(
"SELECTED_AUTH_MODE",
"selected=\"selected\"");
2109 $this->tpl->parseCurrentBlock();
2114 $languages = $this->lng->getInstalledLanguages();
2117 $selected_lang = (isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"language"])) ?
$_SESSION[
"error_post_vars"][
"Fobject"][
"language"] : $this->object->getLanguage();
2119 foreach ($languages as $lang_key)
2121 $this->tpl->setCurrentBlock(
"language_selection");
2122 $this->tpl->setVariable(
"LANG", $this->lng->txt(
"lang_".$lang_key));
2123 $this->tpl->setVariable(
"LANGSHORT", $lang_key);
2125 if ($selected_lang == $lang_key)
2127 $this->tpl->setVariable(
"SELECTED_LANG",
"selected=\"selected\"");
2130 $this->tpl->parseCurrentBlock();
2135 $templates = $styleDefinition->getAllTemplates();
2138 if (isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"skin_style"]))
2140 $sknst = explode(
":",
$_SESSION[
"error_post_vars"][
"Fobject"][
"skin_style"]);
2142 $selected_style = $sknst[1];
2143 $selected_skin = $sknst[0];
2147 $selected_style = $this->
object->prefs[
"style"];
2148 $selected_skin = $this->
object->skin;
2151 include(
"./Services/Style/classes/class.ilObjStyleSettings.php");
2152 if (count($templates) > 0 && is_array ($templates))
2154 foreach ($templates as $template)
2159 $styleDef->startParsing();
2160 $styles = $styleDef->getStyles();
2161 foreach ($styles as $style)
2168 $this->tpl->setCurrentBlock(
"selectskin");
2170 if ($selected_skin == $template[
"id"] &&
2171 $selected_style == $style[
"id"])
2173 $this->tpl->setVariable(
"SKINSELECTED",
"selected=\"selected\"");
2176 $this->tpl->setVariable(
"SKINVALUE", $template[
"id"].
":".$style[
"id"]);
2177 $this->tpl->setVariable(
"SKINOPTION", $styleDef->getTemplateName().
" / ".$style[
"name"]);
2178 $this->tpl->parseCurrentBlock();
2183 $hits_options = array(2,10,15,20,30,40,50,100,9999);
2185 if (isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"hits_per_page"]))
2187 $selected_option =
$_SESSION[
"error_post_vars"][
"Fobject"][
"hits_per_page"];
2191 $selected_option = $this->
object->prefs[
"hits_per_page"];
2193 foreach($hits_options as $hits_option)
2195 $this->tpl->setCurrentBlock(
"selecthits");
2197 if ($selected_option == $hits_option)
2199 $this->tpl->setVariable(
"HITSSELECTED",
"selected=\"selected\"");
2202 $this->tpl->setVariable(
"HITSVALUE", $hits_option);
2204 if ($hits_option == 9999)
2206 $hits_option = $this->lng->txt(
"no_limit");
2209 $this->tpl->setVariable(
"HITSOPTION", $hits_option);
2210 $this->tpl->parseCurrentBlock();
2215 $users_online_options = array(
"y",
"associated",
"n");
2217 if (isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"show_users_online"]))
2219 $selected_option =
$_SESSION[
"error_post_vars"][
"Fobject"][
"show_users_online"];
2223 $selected_option = $this->
object->prefs[
"show_users_online"];
2225 foreach($users_online_options as $an_option)
2227 $this->tpl->setCurrentBlock(
"show_users_online");
2229 if ($selected_option == $an_option)
2231 $this->tpl->setVariable(
"USERS_ONLINE_SELECTED",
"selected=\"selected\"");
2234 $this->tpl->setVariable(
"USERS_ONLINE_VALUE", $an_option);
2236 $this->tpl->setVariable(
"USERS_ONLINE_OPTION", $this->lng->txt(
"users_online_show_".$an_option));
2237 $this->tpl->parseCurrentBlock();
2242 if (isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"hide_own_online_status"]))
2244 $hide_own_online_status =
$_SESSION[
"error_post_vars"][
"Fobject"][
"hide_own_online_status"];
2248 $hide_own_online_status = ($this->
object->prefs[
"hide_own_online_status"] !=
'') ? $this->object->prefs[
"hide_own_online_status"] :
"n";
2250 $this->tpl->setCurrentBlock(
"hide_own_online_status");
2251 $this->tpl->setVariable(
"TXT_HIDE_OWN_ONLINE_STATUS", $this->lng->txt(
"hide_own_online_status"));
2252 if ($hide_own_online_status ==
"y") {
2253 $this->tpl->setVariable(
"CHK_HIDE_OWN_ONLINE_STATUS",
"checked=\"checked\"");
2256 $this->tpl->setVariable(
"CHK_HIDE_OWN_ONLINE_STATUS",
"");
2258 $this->tpl->parseCurrentBlock();
2262 $this->tpl->setCurrentBlock(
"inform_user");
2265 $sendInfoMail = $ilUser->getPref(
'send_info_mails') ==
'y';
2269 $this->tpl->setVariable(
"SEND_MAIL",
" checked=\"checked\"");
2272 $this->tpl->setVariable(
"TXT_INFORM_USER_MAIL", $this->lng->txt(
"inform_user_mail"));
2273 $this->tpl->parseCurrentBlock();
2275 $this->lng->loadLanguageModule(
'crs');
2277 $time_limit_unlimited =
$_SESSION[
"error_post_vars"][
"time_limit"][
"unlimited"] ?
2278 $_SESSION[
"error_post_vars"][
"time_limit"][
"unlimited"] :
2279 $this->
object->getTimeLimitUnlimited();
2280 $time_limit_from =
$_SESSION[
"error_post_vars"][
"time_limit"][
"from"] ?
2282 $this->
object->getTimeLimitFrom();
2284 $time_limit_until =
$_SESSION[
"error_post_vars"][
"time_limit"][
"until"] ?
2286 $this->
object->getTimeLimitUntil();
2288 $this->tpl->setCurrentBlock(
"time_limit");
2289 $this->tpl->setVariable(
"TXT_TIME_LIMIT", $this->lng->txt(
"time_limit"));
2290 $this->tpl->setVariable(
"TXT_TIME_LIMIT_UNLIMITED", $this->lng->txt(
"crs_unlimited"));
2291 $this->tpl->setVariable(
"TXT_TIME_LIMIT_FROM", $this->lng->txt(
"crs_from"));
2292 $this->tpl->setVariable(
"TXT_TIME_LIMIT_UNTIL", $this->lng->txt(
"crs_to"));
2294 $this->tpl->setVariable(
"TIME_LIMIT_UNLIMITED",
ilUtil::formCheckbox($time_limit_unlimited,
"time_limit[unlimited]",1));
2295 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_FROM_MINUTE",$this->
__getDateSelect(
"minute",
"time_limit[from][minute]",
2296 date(
"i",$time_limit_from)));
2297 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_FROM_HOUR",$this->
__getDateSelect(
"hour",
"time_limit[from][hour]",
2298 date(
"G",$time_limit_from)));
2299 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_FROM_DAY",$this->
__getDateSelect(
"day",
"time_limit[from][day]",
2300 date(
"d",$time_limit_from)));
2301 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_FROM_MONTH",$this->
__getDateSelect(
"month",
"time_limit[from][month]",
2302 date(
"m",$time_limit_from)));
2303 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_FROM_YEAR",$this->
__getDateSelect(
"year",
"time_limit[from][year]",
2304 date(
"Y",$time_limit_from)));
2305 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_UNTIL_MINUTE",$this->
__getDateSelect(
"minute",
"time_limit[until][minute]",
2306 date(
"i",$time_limit_until)));
2307 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_UNTIL_HOUR",$this->
__getDateSelect(
"hour",
"time_limit[until][hour]",
2308 date(
"G",$time_limit_until)));
2309 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_UNTIL_DAY",$this->
__getDateSelect(
"day",
"time_limit[until][day]",
2310 date(
"d",$time_limit_until)));
2311 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_UNTIL_MONTH",$this->
__getDateSelect(
"month",
"time_limit[until][month]",
2312 date(
"m",$time_limit_until)));
2313 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_UNTIL_YEAR",$this->
__getDateSelect(
"year",
"time_limit[until][year]",
2314 date(
"Y",$time_limit_until)));
2315 $this->tpl->parseCurrentBlock();
2328 global $ilUser, $rbacsystem;
2332 !$rbacsystem->checkAccess(
'visible,read',$this->usrf_ref_id))
2334 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
2341 if(!$rbacsystem->checkAccess(
'cat_administrate_users',$this->object->getTimeLimitOwner()))
2343 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
2347 $userfile_input = $this->form_gui->getItemByPostVar(
"userfile");
2349 if ($_FILES[
"userfile"][
"tmp_name"] ==
"")
2351 if ($userfile_input->getDeletionFlag())
2353 $this->
object->removeUserPicture();
2357 if ($_FILES[
"userfile"][
"size"] == 0)
2364 $image_dir = $webspace_dir.
"/usr_images";
2365 $store_file =
"usr_".$this->object->getId().
".".
"jpg";
2368 $this->
object->setPref(
"profile_image", $store_file);
2369 $this->
object->update();
2372 $uploaded_file = $image_dir.
"/upload_".$this->
object->getId().
"pic";
2374 $uploaded_file,
false))
2377 $this->ctrl->redirect($this,
"showProfile");
2379 chmod($uploaded_file, 0770);
2383 $show_file =
"$image_dir/usr_".$this->object->getId().
".jpg";
2384 $thumb_file =
"$image_dir/usr_".$this->object->getId().
"_small.jpg";
2385 $xthumb_file =
"$image_dir/usr_".$this->object->getId().
"_xsmall.jpg";
2386 $xxthumb_file =
"$image_dir/usr_".$this->object->getId().
"_xxsmall.jpg";
2392 ilUtil::execConvert($uploaded_file .
"[0] -geometry 200x200 -quality 100 JPEG:".$show_file);
2393 ilUtil::execConvert($uploaded_file .
"[0] -geometry 100x100 -quality 100 JPEG:".$thumb_file);
2394 ilUtil::execConvert($uploaded_file .
"[0] -geometry 75x75 -quality 100 JPEG:".$xthumb_file);
2395 ilUtil::execConvert($uploaded_file .
"[0] -geometry 30x30 -quality 100 JPEG:".$xxthumb_file);
2405 $image_dir = $webspace_dir.
"/usr_images";
2406 $file = $image_dir.
"/usr_".$this->
object->getID().
".".
"jpg";
2407 $thumb_file = $image_dir.
"/usr_".$this->
object->getID().
"_small.jpg";
2408 $xthumb_file = $image_dir.
"/usr_".$this->
object->getID().
"_xsmall.jpg";
2409 $xxthumb_file = $image_dir.
"/usr_".$this->
object->getID().
"_xxsmall.jpg";
2410 $upload_file = $image_dir.
"/upload_".$this->
object->getID();
2413 $this->
object->setPref(
"profile_image",
"");
2414 $this->
object->update();
2417 if (@is_file(
$file))
2421 if (@is_file($thumb_file))
2423 unlink($thumb_file);
2425 if (@is_file($xthumb_file))
2427 unlink($xthumb_file);
2429 if (@is_file($xxthumb_file))
2431 unlink($xxthumb_file);
2433 if (@is_file($upload_file))
2435 unlink($upload_file);
2679 global
$ilias, $rbacsystem, $rbacadmin,$ilUser;
2681 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
2684 $settings = $ilias->getAllSettings();
2687 if($this->usrf_ref_id ==
USER_FOLDER_ID and !$rbacsystem->checkAccess(
'visible,read,write',$this->usrf_ref_id))
2689 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
2696 if(!$rbacsystem->checkAccess(
'cat_administrate_users',$this->object->getTimeLimitOwner()))
2698 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
2702 foreach (
$_POST[
"Fobject"] as $key => $val)
2708 foreach ($settings as $key => $val)
2710 $field = substr($key,8);
2717 $require_keys[] = $field;
2721 $require_keys[] = $field;
2727 foreach ($require_keys as $key => $val)
2730 $system_fields = array(
"default_role");
2731 if (!in_array($val, $system_fields))
2733 if (isset($settings[
"require_" . $val]) && $settings[
"require_" . $val])
2735 if (empty(
$_POST[
"Fobject"][$val]))
2737 $this->ilias->raiseError($this->lng->txt(
"fill_out_all_required_fields") .
": " .
2738 $this->lng->txt($val),$this->ilias->error_obj->MESSAGE);
2746 $this->ilias->raiseError($this->lng->txt(
"fill_out_all_required_fields"),$this->ilias->error_obj->MESSAGE);
2749 if ($this->object->getLogin() !=
$_POST[
"Fobject"][
"login"] &&
2752 $this->ilias->raiseError($this->lng->txt(
"login_invalid"),$this->ilias->error_obj->MESSAGE);
2758 $this->ilias->raiseError($this->lng->txt(
"login_exists"),$this->ilias->error_obj->MESSAGE);
2763 if(
$_POST[
'Fobject'][
'passwd'] ==
"********" and
2764 !strlen($this->object->getPasswd()))
2766 $this->ilias->raiseError($this->lng->txt(
"fill_out_all_required_fields") .
": " .
2767 $this->lng->txt(
'password'),$this->ilias->error_obj->MESSAGE);
2770 if (
$_POST[
"Fobject"][
"passwd"] !=
$_POST[
"Fobject"][
"passwd2"])
2772 $this->ilias->raiseError($this->lng->txt(
"passwd_not_match"),$this->ilias->error_obj->MESSAGE);
2778 $this->ilias->raiseError($this->lng->txt(
"passwd_invalid"),$this->ilias->error_obj->MESSAGE);
2784 $_POST[
'Fobject'][
'passwd'] =
"********";
2788 if(!strlen(
$_POST[
'Fobject'][
'ext_account']))
2790 $this->ilias->raiseError($this->lng->txt(
'ext_acccount_required'),$this->ilias->error_obj->MESSAGE);
2793 if(
$_POST[
'Fobject'][
'ext_account'] &&
2796 if($elogin != $this->object->getLogin())
2798 $this->ilias->raiseError(
2799 sprintf($this->lng->txt(
"err_auth_ext_user_exists"),
2800 $_POST[
"Fobject"][
"ext_account"],
2801 $_POST[
'Fobject'][
'auth_mode'],
2803 $this->ilias->error_obj->MESSAGE);
2809 include_once (
'./Services/User/classes/class.ilObjUser.php');
2815 $this->ilias->raiseError($this->lng->txt(
"email_not_valid"),$this->ilias->error_obj->MESSAGE);
2822 if (!
$_POST[
"time_limit"][
"unlimited"] and
2825 $this->ilias->raiseError($this->lng->txt(
"time_limit_not_valid"),$this->ilias->error_obj->MESSAGE);
2828 if(!$this->ilias->account->getTimeLimitUnlimited())
2830 if($start < $this->ilias->account->getTimeLimitFrom() or
2831 $end > $this->ilias->account->getTimeLimitUntil() or
2832 $_POST[
'time_limit'][
'unlimited'])
2846 $_POST[
'Fobject'][
'time_limit_owner'] = $this->
object->getTimeLimitOwner();
2848 $_POST[
'Fobject'][
'time_limit_unlimited'] = (int)
$_POST[
'time_limit'][
'unlimited'];
2852 if(
$_POST[
'Fobject'][
'time_limit_unlimited'] != $this->object->getTimeLimitUnlimited() or
2853 $_POST[
'Fobject'][
'time_limit_from'] != $this->
object->getTimeLimitFrom() or
2854 $_POST[
'Fobject'][
'time_limit_until'] != $this->
object->getTimeLimitUntil())
2856 $_POST[
'Fobject'][
'time_limit_message'] = 0;
2860 $_POST[
'Fobject'][
'time_limit_message'] = $this->
object->getTimeLimitMessage();
2863 $this->
object->assignData(
$_POST[
"Fobject"]);
2864 $this->
object->setUserDefinedData(
$_POST[
'udf']);
2868 $this->
object->updateLogin(
$_POST[
'Fobject'][
'login']);
2873 $this->form_gui->setValuesByPost();
2874 return $tpl->setContent($this->form_gui->getHtml());
2877 $this->
object->setTitle($this->object->getFullname());
2878 $this->
object->setDescription($this->object->getEmail());
2879 $this->
object->setLanguage(
$_POST[
"Fobject"][
"language"]);
2882 $sknst = explode(
":",
$_POST[
"Fobject"][
"skin_style"]);
2884 if ($this->object->getPref(
"style") != $sknst[1] ||
2885 $this->
object->getPref(
"skin") != $sknst[0])
2887 $this->
object->setPref(
"skin", $sknst[0]);
2888 $this->
object->setPref(
"style", $sknst[1]);
2892 $this->
object->setPref(
"hits_per_page",
$_POST[
"Fobject"][
"hits_per_page"]);
2894 $this->
object->setPref(
"show_users_online",
$_POST[
"Fobject"][
"show_users_online"]);
2896 if (
$_POST[
"Fobject"][
"hide_own_online_status"]) {
2897 $this->
object->setPref(
"hide_own_online_status",
$_POST[
"Fobject"][
"hide_own_online_status"]);
2900 $this->
object->setPref(
"hide_own_online_status",
"n");
2903 $this->update = $this->
object->update();
2908 $ilUser->setPref(
'send_info_mails', (
$_POST[
'send_mail'] ==
'y') ?
'y' :
'n');
2909 $ilUser->writePrefs();
2913 $msg = $this->lng->txt(
'saved_successfully').$mail_message;
2918 if (strtolower(
$_GET[
"baseClass"]) ==
'iladministrationgui')
2920 $this->ctrl->redirectByClass(
"ilobjuserfoldergui",
"view");
2924 $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
2937 global $rbacsystem, $rbacadmin, $rbacreview;
2939 if (!$rbacsystem->checkAccess(
"edit_roleassignment", $this->usrf_ref_id))
2941 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_assign_role_to_user"),$this->ilias->error_obj->MESSAGE);
2944 $selected_roles =
$_POST[
"role_id"] ?
$_POST[
"role_id"] : array();
2945 $posted_roles =
$_POST[
"role_id_ctrl"] ?
$_POST[
"role_id_ctrl"] : array();
2948 if ($this->object->getId() == SYSTEM_USER_ID and in_array(SYSTEM_ROLE_ID, $posted_roles))
2950 array_push($selected_roles,SYSTEM_ROLE_ID);
2953 $global_roles_all = $rbacreview->getGlobalRoles();
2954 $assigned_roles_all = $rbacreview->assignedRoles($this->object->getId());
2955 $assigned_roles = array_intersect($assigned_roles_all,$posted_roles);
2956 $assigned_global_roles_all = array_intersect($assigned_roles_all,$global_roles_all);
2957 $assigned_global_roles = array_intersect($assigned_global_roles_all,$posted_roles);
2958 $posted_global_roles = array_intersect($selected_roles,$global_roles_all);
2960 if ((empty($selected_roles) and count($assigned_roles_all) == count($assigned_roles))
2961 or (empty($posted_global_roles) and count($assigned_global_roles_all) == count($assigned_global_roles)))
2965 ilUtil::sendFailure($this->lng->txt(
"msg_min_one_role").
"<br/>".$this->lng->txt(
"action_aborted"),
true);
2966 $this->ctrl->redirect($this,
'roleassignment');
2969 foreach (array_diff($assigned_roles,$selected_roles) as $role)
2971 $rbacadmin->deassignUser($role,$this->object->getId());
2974 foreach (array_diff($selected_roles,$assigned_roles) as $role)
2976 $rbacadmin->assignUser($role,$this->object->getId(),
false);
2979 include_once
"./Services/AccessControl/classes/class.ilObjRole.php";
2982 $this->
object->update();
2986 if(strtolower(
$_GET[
"baseClass"]) ==
'iladministrationgui')
2988 $this->ctrl->redirect($this,
'roleassignment');
2992 $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
3004 global $rbacreview,$rbacsystem,$ilUser, $ilTabs;
3006 $ilTabs->activateTab(
"role_assignment");
3008 if (!$rbacsystem->checkAccess(
"edit_roleassignment", $this->usrf_ref_id))
3010 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_assign_role_to_user"),$this->ilias->error_obj->MESSAGE);
3020 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.usr_role_assignment.html');
3024 $this->tpl->setCurrentBlock(
"filter");
3025 $this->tpl->setVariable(
"FILTER_TXT_FILTER",$this->lng->txt(
'filter'));
3027 $this->tpl->setVariable(
"FILTER_ACTION",$this->ctrl->getFormAction($this));
3028 $this->tpl->setVariable(
"FILTER_NAME",
'roleassignment');
3029 $this->tpl->setVariable(
"FILTER_VALUE",$this->lng->txt(
'apply_filter'));
3030 $this->tpl->parseCurrentBlock();
3034 include_once(
"./Services/User/classes/class.ilRoleAssignmentTableGUI.php");
3038 $role_list = $rbacreview->getRolesByFilter(
$tab->filter[
"role_filter"],$this->object->getId());
3039 $assigned_roles = $rbacreview->assignedRoles($this->object->getId());
3043 include_once (
'./Services/AccessControl/classes/class.ilObjRole.php');
3046 foreach ($role_list as $role)
3049 $rolf = $rbacreview->getFoldersAssignedToRole($role[
"obj_id"],
true);
3052 if ($rbacreview->isDeleted($rolf[0]))
3060 if ($this->tree->isInTree($rolf[0]))
3062 if ($rolf[0] == ROLE_FOLDER_ID)
3064 $path = $this->lng->txt(
"global");
3068 $tmpPath = $this->tree->getPathFull($rolf[0]);
3081 $path = $tmpPath[count($tmpPath)-2][
"title"];
3086 $path =
"<b>Rolefolder ".$rolf[0].
" not found in tree! (Role ".$role[
"obj_id"].
")</b>";
3092 if (($this->object->getId() == SYSTEM_USER_ID and $role[
"obj_id"] == SYSTEM_ROLE_ID)
3093 or (!in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId())) and $role[
"obj_id"] == SYSTEM_ROLE_ID))
3098 if (substr($role[
"title"],0,3) ==
"il_")
3102 $rolf_arr = $rbacreview->getFoldersAssignedToRole($role[
"obj_id"],
true);
3103 $rolf2 = $rolf_arr[0];
3110 $parent_node = $this->tree->getParentNodeData($rolf2);
3112 $role[
"description"] = $this->lng->txt(
"obj_".$parent_node[
"type"]).
" (#".$parent_node[
"obj_id"].
")";
3115 $role_ids[$counter] = $role[
"obj_id"];
3117 $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"].
"\"/>";
3118 $this->ctrl->setParameterByClass(
"ilobjrolegui",
"ref_id", $rolf[0]);
3119 $this->ctrl->setParameterByClass(
"ilobjrolegui",
"obj_id", $role[
"obj_id"]);
3120 $result_set[$counter][] = $link =
"<a href=\"".$this->ctrl->getLinkTargetByClass(
"ilobjrolegui",
"perm").
"\">".
ilObjRole::_getTranslation($role[
"title"]).
"</a>";
3122 $result_set[$counter][] = $role[
"description"];
3125 if ($role[
"role_type"] ==
"local") {
3133 foreach ($ref_ids as
$ref_id) {}
3135 require_once(
"./classes/class.ilLink.php");
3141 $result_set[$counter][] =
$path;
3145 $records[] = array(
"path" =>
$path,
"description" => $role[
"description"],
3146 "context" => $context,
"checkbox" => $checkbox,
3147 "role" => $link,
"title" =>
$title);
3153 $tab->setData($records);
3154 $this->tpl->setVariable(
"ROLES_TABLE",
$tab->getHTML());
3166 include_once(
"./Services/User/classes/class.ilRoleAssignmentTableGUI.php");
3168 $table_gui->writeFilterToSession();
3169 $table_gui->resetOffset();
3178 include_once(
"./Services/User/classes/class.ilRoleAssignmentTableGUI.php");
3180 $table_gui->resetOffset();
3181 $table_gui->resetFilter();
3190 for($i=0;$i<=60;$i++)
3192 $days[$i] = $i < 10 ?
"0".$i : $i;
3197 for($i=0;$i<24;$i++)
3199 $days[$i] = $i < 10 ?
"0".$i : $i;
3204 for($i=1;$i<32;$i++)
3206 $days[$i] = $i < 10 ?
"0".$i : $i;
3211 for($i=1;$i<13;$i++)
3213 $month[$i] = $i < 10 ?
"0".$i : $i;
3218 if($a_selected < date(
'Y',time()))
3220 $start = $a_selected;
3224 $start = date(
'Y',time());
3227 for($i = $start;$i < date(
"Y",time()) + 11;++$i)
3237 return mktime($a_time_arr[
"hour"],
3238 $a_time_arr[
"minute"],
3239 $a_time_arr[
"second"],
3240 $a_time_arr[
"month"],
3242 $a_time_arr[
"year"]);
3249 $actions = array(
"assignSave" => $this->lng->txt(
"change_assignment"));
3252 $tpl =& $tbl->getTemplateObject();
3254 $tpl->setCurrentBlock(
"tbl_form_header");
3255 $tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
3256 $tpl->parseCurrentBlock();
3258 $tpl->setCurrentBlock(
"tbl_action_row");
3260 $tpl->setVariable(
"COLUMN_COUNTS",4);
3263 foreach (
$actions as $name => $value)
3265 $tpl->setCurrentBlock(
"tbl_action_btn");
3266 $tpl->setVariable(
"BTN_NAME",$name);
3267 $tpl->setVariable(
"BTN_VALUE",$value);
3268 $tpl->parseCurrentBlock();
3271 if (!empty($a_role_ids))
3274 $tpl->setCurrentBlock(
"tbl_action_toggle_checkboxes");
3275 $tpl->setVariable(
"JS_VARNAME",
"role_id");
3277 $tpl->setVariable(
"TXT_CHECKALL", $this->lng->txt(
"check_all"));
3278 $tpl->setVariable(
"TXT_UNCHECKALL", $this->lng->txt(
"uncheck_all"));
3279 $tpl->parseCurrentBlock();
3282 $tpl->setVariable(
"TPLPATH",$this->tpl->tplPath);
3285 $this->ctrl->setParameter($this,
"cmd",
"roleassignment");
3288 $tbl->setTitle($this->lng->txt(
"edit_roleassignment"),
"icon_role.gif",$this->lng->txt(
"roles"));
3291 $tbl->setHeaderNames(array(
"",$this->lng->txt(
"role"),$this->lng->txt(
"description"),$this->lng->txt(
"context")));
3292 $tbl->setHeaderVars(array(
"",
"title",
"description",
"context"),$this->ctrl->getParameterArray($this,
"",
false));
3293 $tbl->setColumnWidth(array(
"",
"30%",
"40%",
"30%"));
3297 $this->tpl->setVariable(
"ROLES_TABLE",$tbl->tpl->get());
3304 include_once
"./Services/Table/classes/class.ilTableGUI.php";
3314 $order =
$_GET[
"sort_by"] ?
$_GET[
"sort_by"] :
"title";
3319 $tbl->setOrderColumn($order);
3320 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
3321 $tbl->setOffset(
$_GET[
"offset"]);
3322 $tbl->setLimit(
$_GET[
"limit"]);
3323 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
3324 $tbl->setData($result_set);
3334 $action[0] = $this->lng->txt(
'assigned_roles');
3335 $action[1] = $this->lng->txt(
'all_roles');
3336 $action[2] = $this->lng->txt(
'all_global_roles');
3337 $action[3] = $this->lng->txt(
'all_local_roles');
3338 $action[4] = $this->lng->txt(
'internal_local_roles_only');
3339 $action[5] = $this->lng->txt(
'non_internal_local_roles_only');
3358 $ilLocator->clearItems();
3360 if (
$_GET[
"admin_mode"] ==
"settings")
3362 $ilLocator->addItem($this->lng->txt(
"administration"),
3363 $this->ctrl->getLinkTargetByClass(
"iladministrationgui",
"frameset"),
3368 $ilLocator->addItem($this->lng->txt(
"obj_".ilObject::_lookupType(
3370 $this->ctrl->getLinkTargetByClass(
"ilobjuserfoldergui",
"view"));
3372 elseif (
$_GET[
'ref_id'] == ROLE_FOLDER_ID)
3374 $ilLocator->addItem($this->lng->txt(
"obj_".ilObject::_lookupType(
3376 $this->ctrl->getLinkTargetByClass(
"ilobjrolefoldergui",
"view"));
3379 if (
$_GET[
"obj_id"] > 0)
3381 $ilLocator->addItem($this->object->getTitle(),
3382 $this->ctrl->getLinkTarget($this,
"view"));
3395 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
3398 $this->ctrl->getLinkTargetByClass(
"ilobjuserfoldergui",
"view"));
3402 if ($this->object->getRefId() != ROOT_FOLDER_ID &&
3403 $this->
object->getRefId() != SYSTEM_FOLDER_ID)
3405 $par_id = $tree->getParentId($this->usrf_ref_id);
3406 $tpl->setUpperIcon(
"repository.php?ref_id=".$par_id);
3415 if(
$_POST[
'send_mail'] !=
'y')
3419 if(!strlen($this->object->getEmail()))
3425 $usr_lang =
new ilLanguage($this->object->getLanguage());
3427 $usr_lang->loadLanguageModule(
'registration');
3429 include_once
"Services/Mail/classes/class.ilMimeMail.php";
3432 $mmail->autoCheck(
false);
3433 $mmail->From($ilUser->getEmail());
3434 $mmail->To($this->object->getEmail());
3437 $subject = $usr_lang->txt(
"profile_changed");
3441 $body = ($usr_lang->txt(
"reg_mail_body_salutation").
" ".$this->
object->getFullname().
",\n\n");
3443 $date = $this->
object->getApproveDate();
3445 if((time() - strtotime($date)) < 10)
3447 $body .= ($usr_lang->txt(
'reg_mail_body_approve').
"\n\n");
3451 $body .= ($usr_lang->txt(
'reg_mail_body_profile_changed').
"\n\n");
3455 if(
$_POST[
'passwd'] !=
'********')
3457 $body .= $usr_lang->txt(
"reg_mail_body_text2").
"\n".
3458 ILIAS_HTTP_PATH.
"/login.php?client_id=".$ilias->client_id.
"\n".
3459 $usr_lang->txt(
"login").
": ".$this->
object->getLogin().
"\n".
3460 $usr_lang->txt(
"passwd").
": ".
$_POST[
'passwd'].
"\n\n";
3462 $body .= ($usr_lang->txt(
"reg_mail_body_text3").
"\n");
3463 $body .= $this->
object->getProfileAsString($usr_lang);
3465 $mmail->Subject($subject);
3466 $mmail->Body($body);
3470 return "<br/>".$this->lng->txt(
"mail_sent");
3478 global $ilAccess,
$ilErr,
$lng, $ilNavigationHistory;
3480 if (substr($a_target, 0, 1) ==
"n")
3485 $_GET[
"cmd"] =
"view";
3486 $_GET[
"user_id"] = (int) $a_target;
3487 $_GET[
"baseClass"] =
"ilPublicUserProfileGUI";
3488 $_GET[
"cmdClass"] =
"ilpublicuserprofilegui";
3489 include(
"ilias.php");