24 require_once
"./classes/class.ilObjectGUI.php";
66 function ilObjUserGUI($a_data,$a_id,$a_call_by_reference =
false, $a_prepare_output =
true)
70 define(
'USER_FOLDER_ID',7);
73 $this->
ilObjectGUI($a_data,$a_id,$a_call_by_reference,
false);
77 $this->ctrl->saveParameter($this,
'obj_id');
81 $this->gender = array(
82 'm' =>
"salutation_m",
91 $next_class = $this->ctrl->getNextClass($this);
92 $cmd = $this->ctrl->getCmd();
98 case "illearningprogressgui":
99 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
101 $this->ctrl->forwardCommand($new_gui);
104 case "ilobjilincusergui":
105 include_once
'./Modules/ILinc/classes/class.ilObjiLincUserGUI.php';
107 $this->ctrl->forwardCommand($new_gui);
117 $return = $this->
$cmd();
128 if(strtolower(get_class($this->
object)) ==
'ilobjuser')
130 $this->tpl->setTitle(
'['.$this->object->getLogin().
'] '.$this->
object->getTitle());
131 $this->tpl->setDescription($this->object->getLongDescription());
132 $this->tpl->setTitleIcon(
ilUtil::getImagePath(
"icon_".$this->object->getType().
"_b.gif"), $this->lng->txt(
"obj_" . $this->object->getType()));
144 session_unregister(
"saved_post");
148 if(strtolower(
$_GET[
"baseClass"]) ==
'iladministrationgui')
150 $this->ctrl->redirectByClass(
"ilobjuserfoldergui",
"view");
156 $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
175 $tabs_gui->clearTargets();
179 $tabs_gui->setBackTarget(
180 $this->lng->txt(
"search_results"),
$_SESSION[
"usr_search_link"]);
182 $tabs_gui->addTarget(
"properties",
183 $this->ctrl->getLinkTarget($this,
"edit"), array(
"edit",
"",
"view"), get_class($this),
"",
true);
187 $tabs_gui->addTarget(
"properties",
188 $this->ctrl->getLinkTarget($this,
"edit"), array(
"edit",
"",
"view"), get_class($this));
191 $tabs_gui->addTarget(
"role_assignment",
192 $this->ctrl->getLinkTarget($this,
"roleassignment"), array(
"roleassignment"), get_class($this));
195 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
199 $tabs_gui->addTarget(
'learning_progress',
200 $this->ctrl->getLinkTargetByClass(
'illearningprogressgui',
''),
202 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui'));
205 if ($this->ilias->getSetting(
"ilinc_active"))
207 $tabs_gui->addTarget(
"extt_ilinc",
208 $this->ctrl->getLinkTargetByClass(
'ilobjilincusergui',
''),
210 array(
'ilobjilincusergui'));
219 $this->back_target = array(
"text" => $a_text,
728 include_once
'./Services/User/classes/class.ilUserDefinedFields.php';
731 foreach($this->user_defined_fields->getDefinitions() as $field_id => $definition)
733 if($definition[
'required'] and !strlen($_POST[
'udf'][$field_id]))
744 include_once
'./Services/User/classes/class.ilUserDefinedFields.php';
747 if($this->object->getType() ==
'usr')
749 $user_defined_data = $this->
object->getUserDefinedData();
751 foreach($this->user_defined_fields->getDefinitions() as $field_id => $definition)
753 $old = isset(
$_SESSION[
"error_post_vars"][
"udf"][$field_id]) ?
754 $_SESSION[
"error_post_vars"][
"udf"][$field_id] : $user_defined_data[$field_id];
758 $this->tpl->setCurrentBlock(
"field_text");
759 $this->tpl->setVariable(
"FIELD_NAME",
'udf['.$definition[
'field_id'].
']');
761 $this->tpl->parseCurrentBlock();
765 $this->tpl->setCurrentBlock(
"field_select");
767 'udf['.$definition[
'field_id'].
']',
768 $this->user_defined_fields->fieldValuesToSelectArray(
769 $definition[
'field_values']),
772 $this->tpl->parseCurrentBlock();
774 $this->tpl->setCurrentBlock(
"user_defined");
776 if($definition[
'required'])
778 $name = $definition[
'field_name'].
"<span class=\"asterisk\">*</span>";
782 $name = $definition[
'field_name'];
784 $this->tpl->setVariable(
"TXT_FIELD_NAME",$name);
785 $this->tpl->parseCurrentBlock();
792 global
$tpl, $rbacsystem, $rbacreview, $ilUser;
796 $this->tabs_gui->clearTargets();
800 $obj_list = $rbacreview->getRoleListByObject(ROLE_FOLDER_ID);
802 foreach ($obj_list as $obj_data)
805 if($this->object->getRefId() !=
USER_FOLDER_ID and !in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId())))
807 include_once
'./Services/AccessControl/classes/class.ilObjRole.php';
815 if ($obj_data[
"obj_id"] != ANONYMOUS_ROLE_ID)
818 if ($obj_data[
"obj_id"] != SYSTEM_ROLE_ID or in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId())))
820 $rol[$obj_data[
"obj_id"]] = $obj_data[
"title"];
828 $this->ilias->raiseError($this->lng->txt(
"msg_no_roles_users_can_be_assigned_to"),$this->ilias->error_obj->MESSAGE);
831 $keys = array_keys($rol);
834 if (in_array(4,$keys))
836 $this->default_role = 4;
840 if (count($keys) > 1 and in_array(2,$keys))
843 foreach ($keys as $key => $val)
853 $this->default_role = array_shift($keys);
855 $this->selectable_roles = $rol;
863 global
$tpl, $rbacsystem, $rbacreview, $ilUser;
865 if (!$rbacsystem->checkAccess(
'create_user', $this->usrf_ref_id) and
866 !$rbacsystem->checkAccess(
'cat_administrate_users',$this->usrf_ref_id))
868 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
873 return $tpl->setContent($this->form_gui->getHtml());
884 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
887 if (!$ilAccess->checkAccess(
'create_user',
"", $this->usrf_ref_id) &&
888 !$ilAccess->checkAccess(
'cat_administrate_users',
"", $this->usrf_ref_id))
890 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
895 if ($this->form_gui->checkInput())
905 $from =
new ilDateTime($_POST[
'time_limit_from'][
'date'].
' '.$_POST[
'time_limit_from'][
'time'],
IL_CAL_DATETIME,$ilUser->getTimeZone());
908 $until =
new ilDateTime($_POST[
'time_limit_until'][
'date'].
' '.$_POST[
'time_limit_until'][
'time'],
IL_CAL_DATETIME,$ilUser->getTimeZone());
911 $userObj->assignData($_POST);
912 $userObj->setTitle($userObj->getFullname());
913 $userObj->setDescription($userObj->getEmail());
915 $userObj->setTimeLimitOwner($this->object->getRefId());
916 $userObj->setTimeLimitUnlimited($_POST[
"time_limit_unlimited"]);
922 foreach($_POST as $k => $v)
924 if (substr($k, 0, 4) ==
"udf_")
926 $udf[(int) substr($k, 4)] = $v;
929 $userObj->setUserDefinedData($udf);
933 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
936 $userObj->setExternalAccount($_POST[
"ext_account"]);
942 $userObj->setLastPasswordChangeTS( time() );
945 $userObj->saveAsNew();
948 $userObj->setLanguage($_POST[
"language"]);
951 $sknst = explode(
":", $_POST[
"skin_style"]);
953 if ($userObj->getPref(
"style") != $sknst[1] ||
954 $userObj->getPref(
"skin") != $sknst[0])
956 $userObj->setPref(
"skin", $sknst[0]);
957 $userObj->setPref(
"style", $sknst[1]);
960 $userObj->setPref(
"hits_per_page", $_POST[
"hits_per_page"]);
961 $userObj->setPref(
"show_users_online", $_POST[
"show_users_online"]);
962 $userObj->setPref(
"hide_own_online_status", $_POST[
"hide_own_online_status"] ?
'y' :
'n');
963 $userObj->writePrefs();
966 $rbacadmin->assignUser($_POST[
"default_role"],$userObj->getId(),
true);
968 $msg = $this->lng->txt(
"user_added");
970 $ilUser->setPref(
'send_info_mails', ($_POST[
'send_mail'] ==
'y') ?
'y' :
'n');
971 $ilUser->writePrefs();
973 $this->
object = $userObj;
977 if($_POST[
'send_mail'] ==
'y')
979 include_once(
'Services/Mail/classes/class.ilAccountMail.php');
981 $acc_mail->useLangVariablesAsFallback(
true);
982 $acc_mail->setUserPassword($_POST[
'passwd']);
983 $acc_mail->setUser($userObj);
985 if ($acc_mail->send())
987 $msg = $msg.
'<br />'.$this->lng->txt(
'mail_sent');
991 $msg = $msg.
'<br />'.$this->lng->txt(
'mail_not_sent');
997 if(strtolower(
$_GET[
"baseClass"]) ==
'iladministrationgui')
999 $this->ctrl->redirectByClass(
"ilobjuserfoldergui",
"view");
1003 $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
1008 $this->form_gui->setValuesByPost();
1009 $tpl->setContent($this->form_gui->getHtml());
1020 global
$ilias, $rbacsystem, $rbacreview, $rbacadmin, $styleDefinition, $ilUser
1023 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
1026 $settings = $ilias->getAllSettings();
1029 if($this->usrf_ref_id ==
USER_FOLDER_ID and !$rbacsystem->checkAccess(
'visible,read',$this->usrf_ref_id))
1031 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
1038 if(!$rbacsystem->checkAccess(
'cat_administrate_users',$this->object->getTimeLimitOwner()))
1040 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
1046 $this->tabs_gui->clearTargets();
1052 $this->tpl->setContent($this->form_gui->getHTML());
1063 if($this->usrf_ref_id ==
USER_FOLDER_ID and !$rbacsystem->checkAccess(
'visible,read,write',$this->usrf_ref_id))
1065 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
1072 if(!$rbacsystem->checkAccess(
'cat_administrate_users',$this->object->getTimeLimitOwner()))
1074 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
1078 if ($this->form_gui->checkInput())
1083 || trim($_POST[
'passwd']) ==
"")
1085 $_POST[
'passwd'] =
"********";
1090 require_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
1092 if( $security_settings->getAccountSecurityMode() ==
1099 if( $_POST[
'active'] == 1 )
1105 $from =
new ilDateTime($_POST[
'time_limit_from'][
'date'].
' '.$_POST[
'time_limit_from'][
'time'],
IL_CAL_DATETIME,$ilUser->getTimeZone());
1108 $until =
new ilDateTime($_POST[
'time_limit_until'][
'date'].
' '.$_POST[
'time_limit_until'][
'time'],
IL_CAL_DATETIME,$ilUser->getTimeZone());
1110 $_POST[
'time_limit_owner'] = $this->usrf_ref_id;
1111 $this->
object->assignData($_POST);
1117 foreach($_POST as $k => $v)
1119 if (substr($k, 0, 4) ==
"udf_")
1121 $udf[(int) substr($k, 4)] = $v;
1124 $this->
object->setUserDefinedData($udf);
1126 $this->
object->updateLogin($_POST[
"login"]);
1127 $this->
object->setTitle($this->object->getFullname());
1128 $this->
object->setDescription($this->object->getEmail());
1129 $this->
object->setLanguage($_POST[
"language"]);
1132 $sknst = explode(
":", $_POST[
"skin_style"]);
1134 if ($this->object->getPref(
"style") != $sknst[1] ||
1135 $this->
object->getPref(
"skin") != $sknst[0])
1137 $this->
object->setPref(
"skin", $sknst[0]);
1138 $this->
object->setPref(
"style", $sknst[1]);
1141 $this->
object->setPref(
"hits_per_page", $_POST[
"hits_per_page"]);
1142 $this->
object->setPref(
"show_users_online", $_POST[
"show_users_online"]);
1143 $this->
object->setPref(
"hide_own_online_status", $_POST[
"hide_own_online_status"] ?
'y' :
'n');
1148 $this->
object->setLastPasswordChangeTS( time() );
1151 $this->update = $this->
object->update();
1156 if ($ilUser->getId() == $this->
object->getId())
1158 $ilUser->readPrefs();
1160 $ilUser->setPref(
'send_info_mails', ($_POST[
'send_mail'] ==
'y') ?
'y' :
'n');
1161 $ilUser->writePrefs();
1164 $msg = $this->lng->txt(
'saved_successfully').$mail_message;
1174 if (strtolower(
$_GET[
"baseClass"]) ==
'iladministrationgui')
1176 $this->ctrl->redirectByClass(
"ilobjuserfoldergui",
"view");
1180 $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
1185 $this->form_gui->setValuesByPost();
1186 $tpl->setContent($this->form_gui->getHtml());
1200 $data[
"auth_mode"] = $this->
object->getAuthMode();
1201 $data[
"login"] = $this->
object->getLogin();
1204 $data[
"ext_account"] = $this->
object->getExternalAccount();
1207 require_once
'classes/class.ilFormat.php';
1213 $data[
"active"] = $this->
object->getActive();
1214 $data[
"time_limit_unlimited"] = $this->
object->getTimeLimitUnlimited();
1216 $from =
new ilDateTime($this->object->getTimeLimitFrom() ? $this->
object->getTimeLimitFrom() : time(),
IL_CAL_UNIX);
1217 $data[
"time_limit_from"][
"date"] = $from->
get(
IL_CAL_FKT_DATE,
'Y-m-d',$ilUser->getTimeZone());
1218 $data[
"time_limit_from"][
"time"] = $from->
get(
IL_CAL_FKT_DATE,
'H:i:s',$ilUser->getTimeZone());
1220 $until =
new ilDateTime($this->object->getTimeLimitUntil() ? $this->
object->getTimeLimitUntil() : time(),
IL_CAL_UNIX);
1221 $data[
'time_limit_until'][
'date'] = $until->
get(
IL_CAL_FKT_DATE,
'Y-m-d',$ilUser->getTimeZone());
1222 $data[
'time_limit_until'][
'time'] = $until->
get(
IL_CAL_FKT_DATE,
'H:i:s',$ilUser->getTimeZone());
1246 $data[
"gender"] = $this->
object->getGender();
1247 $data[
"firstname"] = $this->
object->getFirstname();
1248 $data[
"lastname"] = $this->
object->getLastname();
1249 $data[
"title"] = $this->
object->getUTitle();
1250 $data[
"institution"] = $this->
object->getInstitution();
1251 $data[
"department"] = $this->
object->getDepartment();
1252 $data[
"street"] = $this->
object->getStreet();
1253 $data[
"city"] = $this->
object->getCity();
1254 $data[
"zipcode"] = $this->
object->getZipcode();
1255 $data[
"country"] = $this->
object->getCountry();
1256 $data[
"phone_office"] = $this->
object->getPhoneOffice();
1257 $data[
"phone_home"] = $this->
object->getPhoneHome();
1258 $data[
"phone_mobile"] = $this->
object->getPhoneMobile();
1259 $data[
"fax"] = $this->
object->getFax();
1260 $data[
"email"] = $this->
object->getEmail();
1261 $data[
"hobby"] = $this->
object->getHobby();
1262 $data[
"referral_comment"] = $this->
object->getComment();
1265 $data[
"im_icq"] = $this->
object->getInstantMessengerId(
'icq');
1266 $data[
"im_yahoo"] = $this->
object->getInstantMessengerId(
'yahoo');
1267 $data[
"im_msn"] = $this->
object->getInstantMessengerId(
'msn');
1268 $data[
"im_aim"] = $this->
object->getInstantMessengerId(
'aim');
1269 $data[
"im_skype"] = $this->
object->getInstantMessengerId(
'skype');
1272 $data[
"matriculation"] = $this->
object->getMatriculation();
1273 $data[
"client_ip"] = $this->
object->getClientIP();
1276 include_once
'./Services/User/classes/class.ilUserDefinedFields.php';
1278 $user_defined_data = $this->
object->getUserDefinedData();
1279 foreach($this->user_defined_fields->getDefinitions() as $field_id => $definition)
1281 $data[
"udf_".$field_id] = $user_defined_data[$field_id];
1285 $data[
"language"] = $this->
object->getLanguage();
1286 $data[
"skin_style"] = $this->
object->skin.
":".$this->
object->prefs[
"style"];
1287 $data[
"hits_per_page"] = $this->
object->prefs[
"hits_per_page"];
1288 $data[
"show_users_online"] = $this->
object->prefs[
"show_users_online"];
1289 $data[
"hide_own_online_status"] = $this->
object->prefs[
"hide_own_online_status"] ==
'y';
1291 $this->form_gui->setValuesByArray($data);
1301 $settings = $ilSetting->getAll();
1303 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1306 $this->form_gui->setFormAction($ilCtrl->getFormAction($this));
1307 if ($a_mode ==
"create")
1309 $this->form_gui->setTitle($lng->txt(
"usr_new"));
1313 $this->form_gui->setTitle($lng->txt(
"usr_edit"));
1318 $sec_l->setTitle($lng->txt(
"login_data"));
1319 $this->form_gui->addItem($sec_l);
1322 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
1326 foreach ($active_auth_modes as $auth_name => $auth_key)
1328 if ($auth_name ==
'default')
1334 $name = $this->lng->txt(
'auth_'.$auth_name);
1336 $option[$auth_name] = $name;
1339 $this->form_gui->addItem($am);
1344 if ($a_mode ==
"edit")
1346 $lo->setCurrentUserId($this->object->getId());
1348 $this->form_gui->addItem($lo);
1356 $pw->setMaxLength(32);
1357 $pw->setValidateAuthPost(
"auth_mode");
1358 if ($a_mode ==
"create")
1360 $pw->setRequiredOnAuth(
true);
1362 $this->form_gui->addItem($pw);
1367 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
1370 $ext =
new ilTextInputGUI($lng->txt(
"user_ext_account"),
"ext_account");
1372 $ext->setMaxLength(50);
1373 $ext->setInfo($lng->txt(
"user_ext_account_desc"));
1374 $this->form_gui->addItem($ext);
1379 $sec_si->setTitle($this->lng->txt(
"system_information"));
1380 $this->form_gui->addItem($sec_si);
1383 if ($a_mode ==
"edit")
1385 $sia = array(
"create_date",
"approve_date",
"agree_date",
"last_login",
"owner");
1389 $this->form_gui->addItem($siai);
1396 $this->form_gui->addItem($ac);
1399 $lng->loadLanguageModule(
'crs');
1402 $ac->setOptionTitle($lng->txt(
"crs_unlimited"));
1407 $ac->addSubItem($acfrom);
1412 $ac->addSubItem($acto);
1414 $this->form_gui->addItem($ac);
1429 $sec_pd->setTitle($this->lng->txt(
"personal_data"));
1430 $this->form_gui->addItem($sec_pd);
1434 $gndr->
setRequired(isset($settings[
"require_gender"]) && $settings[
"require_gender"]);
1436 $gndr->addOption($female);
1438 $gndr->addOption($male);
1439 $this->form_gui->addItem($gndr);
1442 $fields = array(
"firstname" =>
true,
"lastname" =>
true,
1443 "title" => isset($settings[
"require_title"]) && $settings[
"require_title"]);
1444 foreach($fields as $field => $req)
1448 $inp->setMaxLength(32);
1449 $inp->setRequired($req);
1450 $this->form_gui->addItem($inp);
1455 if ($a_mode ==
"edit" || $a_mode ==
"upload")
1460 $this->form_gui->addItem($pi);
1464 $sec_cd->setTitle($this->lng->txt(
"contact_data"));
1465 $this->form_gui->addItem($sec_cd);
1470 array(
"institution", 40, 80),
1471 array(
"department", 40, 80),
1472 array(
"street", 40, 40),
1473 array(
"city", 40, 40),
1474 array(
"zipcode", 10, 10),
1475 array(
"country", 40, 40),
1476 array(
"phone_office", 30, 30),
1477 array(
"phone_home", 30, 30),
1478 array(
"phone_mobile", 30, 30),
1479 array(
"fax", 30, 30));
1480 foreach ($fields as $field)
1484 $inp->setMaxLength($field[2]);
1485 $inp->setRequired(isset($settings[
"require_".$field[0]]) &&
1486 $settings[
"require_".$field[0]]);
1487 $this->form_gui->addItem($inp);
1492 $em->
setRequired(isset($settings[
"require_email"]) &&
1493 $settings[
"require_email"]);
1494 $this->form_gui->addItem($em);
1500 $hob->setRequired(isset($settings[
"require_hobby"]) &&
1501 $settings[
"require_hobby"]);
1502 $this->form_gui->addItem($hob);
1508 $rc->setRequired(isset($settings[
"require_referral_comment"]) &&
1509 $settings[
"require_referral_comment"]);
1510 $this->form_gui->addItem($rc);
1514 $sec_im->setTitle($this->lng->txt(
"instant_messengers"));
1515 $this->form_gui->addItem($sec_im);
1518 $fields = array(
"icq",
"yahoo",
"msn",
"aim",
"skype");
1519 foreach ($fields as $field)
1523 $im->setMaxLength(40);
1524 $this->form_gui->addItem($im);
1529 $sec_oi->setTitle($this->lng->txt(
"user_profile_other"));
1530 $this->form_gui->addItem($sec_oi);
1533 $mr =
new ilTextInputGUI($lng->txt(
"matriculation"),
"matriculation");
1535 $mr->setMaxLength(40);
1536 $mr->setRequired(isset($settings[
"require_matriculation"]) &&
1537 $settings[
"require_matriculation"]);
1538 $this->form_gui->addItem($mr);
1543 $ip->setMaxLength(255);
1544 $ip->setInfo($this->lng->txt(
"current_ip").
" ".$_SERVER[
"REMOTE_ADDR"].
" <br />".
1545 '<small class="warning">'.$this->lng->txt(
"current_ip_alert").
"</span>");
1546 $this->form_gui->addItem($ip);
1549 include_once
'./Services/User/classes/class.ilUserDefinedFields.php';
1551 foreach($user_defined_fields->getDefinitions() as $field_id => $definition)
1556 "udf_".$definition[
'field_id']);
1558 $udf->setMaxLength(255);
1563 "udf_".$definition[
'field_id']);
1564 $udf->setOptions($user_defined_fields->fieldValuesToSelectArray(
1565 $definition[
'field_values']));
1567 $udf->setRequired($definition[
'required']);
1568 $this->form_gui->addItem($udf);
1573 $sec_st->setTitle($this->lng->txt(
"settings"));
1574 $this->form_gui->addItem($sec_st);
1577 if ($a_mode ==
"create")
1582 $role->setValue($this->default_role);
1583 $role->setOptions($this->selectable_roles);
1584 $this->form_gui->addItem($role);
1590 $languages = $this->lng->getInstalledLanguages();
1592 foreach($languages as $l)
1594 $options[$l] = $lng->txt(
"lang_".$l);
1596 $lang->setOptions($options);
1597 $lang->setValue($ilSetting->get(
"language"));
1598 $this->form_gui->addItem(
$lang);
1603 $templates = $styleDefinition->getAllTemplates();
1604 include(
"./Services/Style/classes/class.ilObjStyleSettings.php");
1606 if (count($templates) > 0 && is_array ($templates))
1608 foreach ($templates as $template)
1611 $styleDef->startParsing();
1612 $styles = $styleDef->getStyles();
1613 foreach ($styles as $style)
1619 $options[$template[
"id"].
":".$style[
"id"]] =
1620 $styleDef->getTemplateName().
" / ".$style[
"name"];
1624 $sk->setOptions($options);
1625 $sk->setValue($ilClientIniFile->readVariable(
"layout",
"skin").
1626 ":".$ilClientIniFile->readVariable(
"layout",
"style"));
1628 $this->form_gui->addItem($sk);
1633 $options = array(10 => 10, 15 => 15, 20 => 20, 30 => 30, 40 => 40,
1634 50 => 50, 100 => 100, 9999 => $this->lng->txt(
"no_limit"));
1636 $hpp->setValue($ilSetting->get(
"hits_per_page"));
1637 $this->form_gui->addItem($hpp);
1641 'show_users_online');
1643 "y" => $lng->txt(
"users_online_show_y"),
1644 "associated" => $lng->txt(
"users_online_show_associated"),
1645 "n" => $lng->txt(
"users_online_show_n"));
1647 $uo->setValue($ilSetting->get(
"show_users_online"));
1648 $this->form_gui->addItem($uo);
1651 $os =
new ilCheckboxInputGUI($lng->txt(
"hide_own_online_status"),
"hide_own_online_status");
1652 $this->form_gui->addItem($os);
1656 $sec_op->setTitle($this->lng->txt(
"options"));
1657 $this->form_gui->addItem($sec_op);
1662 $se->setChecked(($ilUser->getPref(
'send_info_mails') ==
'y'));
1663 $this->form_gui->addItem($se);
1668 if ($a_mode ==
"create" || $a_mode ==
"save")
1670 $this->form_gui->addCommandButton(
"save", $lng->txt(
"save"));
1672 if ($a_mode ==
"edit" || $a_mode ==
"update")
1674 $this->form_gui->addCommandButton(
"update", $lng->txt(
"save"));
1676 $this->form_gui->addCommandButton(
"cancel", $lng->txt(
"cancel"));
1686 global
$ilias, $rbacsystem, $rbacreview, $rbacadmin, $styleDefinition, $ilUser
1689 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
1693 $settings = $ilias->getAllSettings();
1696 if($this->usrf_ref_id ==
USER_FOLDER_ID and !$rbacsystem->checkAccess(
'visible,read',$this->usrf_ref_id))
1698 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
1705 if(!$rbacsystem->checkAccess(
'cat_administrate_users',$this->object->getTimeLimitOwner()))
1707 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
1713 $this->tabs_gui->clearTargets();
1717 $data[
"fields"] = array();
1718 $data[
"fields"][
"login"] = $this->
object->getLogin();
1719 $data[
"fields"][
"passwd"] =
"********";
1720 #$data["fields"]["passwd2"] = "********"; // will not be saved
1721 $data[
"fields"][
"ext_account"] = $this->
object->getExternalAccount();
1722 $data[
"fields"][
"title"] = $this->
object->getUTitle();
1723 $data[
"fields"][
"gender"] = $this->
object->getGender();
1724 $data[
"fields"][
"firstname"] = $this->
object->getFirstname();
1725 $data[
"fields"][
"lastname"] = $this->
object->getLastname();
1726 $data[
"fields"][
"institution"] = $this->
object->getInstitution();
1727 $data[
"fields"][
"department"] = $this->
object->getDepartment();
1728 $data[
"fields"][
"street"] = $this->
object->getStreet();
1729 $data[
"fields"][
"city"] = $this->
object->getCity();
1730 $data[
"fields"][
"zipcode"] = $this->
object->getZipcode();
1731 $data[
"fields"][
"country"] = $this->
object->getCountry();
1732 $data[
"fields"][
"phone_office"] = $this->
object->getPhoneOffice();
1733 $data[
"fields"][
"phone_home"] = $this->
object->getPhoneHome();
1734 $data[
"fields"][
"phone_mobile"] = $this->
object->getPhoneMobile();
1735 $data[
"fields"][
"fax"] = $this->
object->getFax();
1736 $data[
"fields"][
"email"] = $this->
object->getEmail();
1737 $data[
"fields"][
"hobby"] = $this->
object->getHobby();
1738 $data[
"fields"][
"im_icq"] = $this->
object->getInstantMessengerId(
'icq');
1739 $data[
"fields"][
"im_yahoo"] = $this->
object->getInstantMessengerId(
'yahoo');
1740 $data[
"fields"][
"im_msn"] = $this->
object->getInstantMessengerId(
'msn');
1741 $data[
"fields"][
"im_aim"] = $this->
object->getInstantMessengerId(
'aim');
1742 $data[
"fields"][
"im_skype"] = $this->
object->getInstantMessengerId(
'skype');
1743 $data[
"fields"][
"matriculation"] = $this->
object->getMatriculation();
1744 $data[
"fields"][
"client_ip"] = $this->
object->getClientIP();
1745 $data[
"fields"][
"referral_comment"] = $this->
object->getComment();
1747 $data[
"fields"][
"create_date"] = $this->
object->getCreateDate();
1748 $data[
"fields"][
"approve_date"] = $this->
object->getApproveDate();
1749 $data[
"fields"][
"agree_date"] = $this->
object->getAgreeDate();
1750 $data[
"fields"][
"last_login"] = $this->
object->getLastLogin();
1751 $data[
"fields"][
"active"] = $this->
object->getActive();
1752 $data[
"fields"][
"auth_mode"] = $this->
object->getAuthMode();
1753 $data[
"fields"][
"ext_account"] = $this->
object->getExternalAccount();
1756 $this->tpl->setVariable(
"TXT_UPLOAD",$this->lng->txt(
"personal_picture"));
1758 $full_img = $this->
object->getPref(
"profile_image");
1759 $last_dot = strrpos($full_img,
".");
1760 $small_img = substr($full_img, 0, $last_dot).
1761 "_small".substr($full_img, $last_dot, strlen($full_img) - $last_dot);
1762 $image_file = $webspace_dir.
"/usr_images/".$small_img;
1763 if (@is_file($image_file))
1765 $this->tpl->setVariable(
"IMG_PERSONAL", $image_file.
"?dummy=".rand(1,99999));
1766 $this->tpl->setVariable(
"ALT_IMG_PERSONAL",$this->lng->txt(
"personal_picture"));
1767 $this->tpl->setVariable(
"TXT_REMOVE_PIC", $this->lng->txt(
"remove_personal_picture"));
1770 $this->tpl->setVariable(
"UPLOAD", $this->lng->txt(
"upload"));
1771 $this->tpl->setVariable(
"TXT_FILE", $this->lng->txt(
"userfile"));
1772 $this->tpl->setVariable(
"USER_FILE", $this->lng->txt(
"user_file"));
1797 $user_is_online =
false;
1801 $user_is_online =
true;
1804 preg_match(
"/RoleId.*?;\}/",$user_online[$this->object->getId()][
"data"],$matches);
1806 $active_roles = unserialize(substr($matches[0],7));
1809 $assigned_roles = $rbacreview->assignedRoles($this->object->getId());
1811 foreach ($assigned_roles as $key => $role)
1813 $roleObj = $this->ilias->obj_factory->getInstanceByObjId($role);
1816 $rolf = $rbacreview->getFoldersAssignedToRole($role,
true);
1819 if (count($rolf) > 0)
1821 if (!$rbacreview->isDeleted($rolf[0]))
1825 if ($this->tree->isInTree($rolf[0]))
1827 $tmpPath = $this->tree->getPathFull($rolf[0]);
1830 for ($i = 0; $i < (count($tmpPath)-1); $i++)
1837 $path .= $tmpPath[$i][
"title"];
1842 $path =
"<b>Rolefolder ".$rolf[0].
" not found in tree! (Role ".$role.
")</b>";
1844 $active_roles = $active_roles ? $active_roles : array();
1845 if (in_array($role,$active_roles))
1847 $data[
"active_role"][$role][
"active"] =
true;
1850 $data[
"active_role"][$role][
"title"] = $roleObj->getTitle();
1851 $data[
"active_role"][$role][
"context"] = $path;
1858 $path =
"<b>No role folder found for role ".$role.
"!</b>";
1866 if (isset(
$_SESSION[
"error_post_vars"][
"Fobject"]))
1868 if (!isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"active"]))
1870 $_SESSION[
"error_post_vars"][
"Fobject"][
"active"] = 0;
1873 foreach (
$_SESSION[
"error_post_vars"][
"Fobject"] as $key => $val)
1875 $str = $this->lng->txt($key);
1876 if ($key ==
"title")
1878 $str = $this->lng->txt(
"person_title");
1880 if($key ==
'passwd2')
1884 if($key ==
'passwd')
1889 $this->tpl->setCurrentBlock(
'passwords_visible');
1890 $this->tpl->setVariable(
'VISIBLE_TXT_PASSWD',$this->lng->txt(
'passwd'));
1891 $this->tpl->setVariable(
'VISIBLE_TXT_PASSWD2',$this->lng->txt(
'retype_password'));
1892 $this->tpl->setVariable(
'VISIBLE_PASSWD',
$_SESSION[
'error_post_vars'][
'Fobject'][
'passwd']);
1893 $this->tpl->setVariable(
'VISIBLE_PASSWD2',
$_SESSION[
'error_post_vars'][
'Fobject'][
'passwd2']);
1894 $this->tpl->parseCurrentBlock();
1898 $this->tpl->setCurrentBlock(
'passwords_invisible');
1899 $this->tpl->setVariable(
'INVISIBLE_TXT_PASSWD',$this->lng->txt(
'passwd'));
1900 $this->tpl->setVariable(
'INVISIBLE_TXT_PASSWD2',$this->lng->txt(
'retype_password'));
1901 $this->tpl->setVariable(
'INVISIBLE_PASSWD',strlen($this->object->getPasswd()) ?
1904 $this->tpl->setVariable(
'INVISIBLE_PASSWD2',strlen($this->object->getPasswd()) ?
1907 $this->tpl->setVariable(
'INVISIBLE_PASSWD_HIDDEN',
"********");
1908 $this->tpl->parseCurrentBlock();
1915 if (isset($settings[
"require_" . $key]) && $settings[
"require_" . $key])
1917 $str = $str .
'<span class="asterisk">*</span>';
1920 $this->tpl->setVariable(
"TXT_".strtoupper($key), $str);
1922 if ($key !=
"default_role" and $key !=
"language"
1923 and $key !=
"skin_style" and $key !=
"hits_per_page"
1924 and $key !=
"show_users_online")
1936 $this->tpl->setVariable(
"BTN_GENDER_".
$gender,
"checked=\"checked\"");
1939 $active =
$_SESSION[
"error_post_vars"][
"Fobject"][
"active"];
1942 $this->tpl->setVariable(
"ACTIVE",
"checked=\"checked\"");
1947 if (!isset($data[
"fields"][
"active"]))
1949 $data[
"fields"][
"active"] = 0;
1952 foreach ($data[
"fields"] as $key => $val)
1954 $str = $this->lng->txt($key);
1955 if ($key ==
"title")
1957 $str = $this->lng->txt(
"person_title");
1959 if ($key ==
"ext_account")
1963 if($key ==
'passwd')
1965 $auth_mode = $this->
object->getAuthMode(
true);
1968 $this->tpl->setCurrentBlock(
'passwords_visible');
1969 $this->tpl->setVariable(
'VISIBLE_TXT_PASSWD',$this->lng->txt(
'passwd'));
1970 $this->tpl->setVariable(
'VISIBLE_TXT_PASSWD2',$this->lng->txt(
'retype_password'));
1971 $this->tpl->setVariable(
'VISIBLE_PASSWD',
"********");
1972 $this->tpl->setVariable(
'VISIBLE_PASSWD2',
"********");
1973 $this->tpl->parseCurrentBlock();
1977 $this->tpl->setCurrentBlock(
'passwords_invisible');
1978 $this->tpl->setVariable(
'INVISIBLE_TXT_PASSWD',$this->lng->txt(
'passwd'));
1979 $this->tpl->setVariable(
'INVISIBLE_TXT_PASSWD2',$this->lng->txt(
'retype_password'));
1980 $this->tpl->setVariable(
'INVISIBLE_PASSWD',strlen($this->object->getPasswd()) ?
1983 $this->tpl->setVariable(
'INVISIBLE_PASSWD2',strlen($this->object->getPasswd()) ?
1986 $this->tpl->setVariable(
'INVISIBLE_PASSWD_HIDDEN',
"********");
1987 $this->tpl->parseCurrentBlock();
1993 if (isset($settings[
"require_" . $key]) && $settings[
"require_" . $key])
1995 $str = $str .
'<span class="asterisk">*</span>';
1998 $this->tpl->setVariable(
"TXT_".strtoupper($key), $str);
2001 #$this->tpl->parseCurrentBlock();
2005 $gender = strtoupper($data[
"fields"][
"gender"]);
2009 $this->tpl->setVariable(
"BTN_GENDER_".
$gender,
"checked=\"checked\"");
2012 $active = $data[
"fields"][
"active"];
2015 $this->tpl->setVariable(
"ACTIVE",
"checked=\"checked\"");
2020 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
2023 $this->tpl->setCurrentBlock(
"ext_account");
2024 $this->tpl->setVariable(
"TXT_EXT_ACCOUNT",$this->lng->txt(
"user_ext_account"));
2025 $this->tpl->setVariable(
"TXT_EXT_ACCOUNT_DESC",$this->lng->txt(
"user_ext_account_desc"));
2026 if (isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"ext_account"]))
2028 $this->tpl->setVariable(
"EXT_ACCOUNT_VAL",
2029 $_SESSION[
"error_post_vars"][
"Fobject"][
"ext_account"]);
2033 $this->tpl->setVariable(
"EXT_ACCOUNT_VAL",
2034 $data[
"fields"][
"ext_account"]);
2045 $this->tpl->parseCurrentBlock();
2047 $auth_mode =
$_SESSION[
'error_post_vars'][
'Fobject'][
'auth_mode'] ?
2049 $this->
object->getAuthMode(
true);
2052 $this->tpl->setVariable(
"OPTION_DISABLED",
"\"disabled=disabled\"");
2054 $obj_str = ($this->call_by_reference) ?
"" :
"&obj_id=".$this->obj_id;
2056 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
2057 $this->tpl->setVariable(
"TXT_HEADER", $this->lng->txt($this->object->getType().
"_edit"));
2058 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
2059 $this->tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"save"));
2060 $this->tpl->setVariable(
"CMD_SUBMIT",
"update");
2061 $this->tpl->setVariable(
"TARGET", $this->
getTargetFrame(
"update"));
2062 $this->tpl->setVariable(
"TXT_REQUIRED_FLD", $this->lng->txt(
"required_field"));
2064 $this->tpl->setVariable(
"TXT_LOGIN_DATA", $this->lng->txt(
"login_data"));
2065 $this->tpl->setVariable(
"TXT_SYSTEM_INFO", $this->lng->txt(
"system_information"));
2066 $this->tpl->setVariable(
"TXT_PERSONAL_DATA", $this->lng->txt(
"personal_data"));
2067 $this->tpl->setVariable(
"TXT_CONTACT_DATA", $this->lng->txt(
"contact_data"));
2068 $this->tpl->setVariable(
"TXT_SETTINGS", $this->lng->txt(
"settings"));
2069 $this->tpl->setVariable(
"TXT_LANGUAGE",$this->lng->txt(
"language"));
2070 $this->tpl->setVariable(
"TXT_SKIN_STYLE",$this->lng->txt(
"usr_skin_style"));
2071 $this->tpl->setVariable(
"TXT_HITS_PER_PAGE",$this->lng->txt(
"hits_per_page"));
2072 $this->tpl->setVariable(
"TXT_SHOW_USERS_ONLINE",$this->lng->txt(
"show_users_online"));
2073 $this->tpl->setVariable(
"TXT_GENDER_F",$this->lng->txt(
"gender_f"));
2074 $this->tpl->setVariable(
"TXT_GENDER_M",$this->lng->txt(
"gender_m"));
2075 $this->tpl->setVariable(
"TXT_INSTANT_MESSENGERS",$this->lng->txt(
"user_profile_instant_messengers"));
2076 $this->tpl->setVariable(
"TXT_OTHER",$this->lng->txt(
"user_profile_other"));
2077 if ($this->object->getId() == $ilUser->getId())
2079 $this->tpl->setVariable(
"TXT_CURRENT_IP",
"(".$this->lng->txt(
"current_ip").
" ".$_SERVER[
"REMOTE_ADDR"].
")");
2081 $this->tpl->setVariable(
"TXT_CURRENT_IP_ALERT",$this->lng->txt(
"current_ip_alert"));
2084 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
2088 $selected_auth_mode = (isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"auth_mode"])) ?
$_SESSION[
"error_post_vars"][
"Fobject"][
"auth_mode"] : $this->object->getAuthMode();
2090 foreach ($active_auth_modes as $auth_name => $auth_key)
2092 $this->tpl->setCurrentBlock(
"auth_mode_selection");
2094 if ($auth_name ==
'default')
2100 $name = $this->lng->txt(
'auth_'.$auth_name);
2103 $this->tpl->setVariable(
"AUTH_MODE_NAME", $name);
2105 $this->tpl->setVariable(
"AUTH_MODE", $auth_name);
2107 if ($selected_auth_mode == $auth_name)
2109 $this->tpl->setVariable(
"SELECTED_AUTH_MODE",
"selected=\"selected\"");
2112 $this->tpl->parseCurrentBlock();
2117 $languages = $this->lng->getInstalledLanguages();
2120 $selected_lang = (isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"language"])) ?
$_SESSION[
"error_post_vars"][
"Fobject"][
"language"] : $this->object->getLanguage();
2122 foreach ($languages as $lang_key)
2124 $this->tpl->setCurrentBlock(
"language_selection");
2125 $this->tpl->setVariable(
"LANG", $this->lng->txt(
"lang_".$lang_key));
2126 $this->tpl->setVariable(
"LANGSHORT", $lang_key);
2128 if ($selected_lang == $lang_key)
2130 $this->tpl->setVariable(
"SELECTED_LANG",
"selected=\"selected\"");
2133 $this->tpl->parseCurrentBlock();
2138 $templates = $styleDefinition->getAllTemplates();
2141 if (isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"skin_style"]))
2143 $sknst = explode(
":",
$_SESSION[
"error_post_vars"][
"Fobject"][
"skin_style"]);
2145 $selected_style = $sknst[1];
2146 $selected_skin = $sknst[0];
2150 $selected_style = $this->
object->prefs[
"style"];
2151 $selected_skin = $this->
object->skin;
2154 include(
"./Services/Style/classes/class.ilObjStyleSettings.php");
2155 if (count($templates) > 0 && is_array ($templates))
2157 foreach ($templates as $template)
2162 $styleDef->startParsing();
2163 $styles = $styleDef->getStyles();
2164 foreach ($styles as $style)
2171 $this->tpl->setCurrentBlock(
"selectskin");
2173 if ($selected_skin == $template[
"id"] &&
2174 $selected_style == $style[
"id"])
2176 $this->tpl->setVariable(
"SKINSELECTED",
"selected=\"selected\"");
2179 $this->tpl->setVariable(
"SKINVALUE", $template[
"id"].
":".$style[
"id"]);
2180 $this->tpl->setVariable(
"SKINOPTION", $styleDef->getTemplateName().
" / ".$style[
"name"]);
2181 $this->tpl->parseCurrentBlock();
2186 $hits_options = array(2,10,15,20,30,40,50,100,9999);
2188 if (isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"hits_per_page"]))
2190 $selected_option =
$_SESSION[
"error_post_vars"][
"Fobject"][
"hits_per_page"];
2194 $selected_option = $this->
object->prefs[
"hits_per_page"];
2196 foreach($hits_options as $hits_option)
2198 $this->tpl->setCurrentBlock(
"selecthits");
2200 if ($selected_option == $hits_option)
2202 $this->tpl->setVariable(
"HITSSELECTED",
"selected=\"selected\"");
2205 $this->tpl->setVariable(
"HITSVALUE", $hits_option);
2207 if ($hits_option == 9999)
2209 $hits_option = $this->lng->txt(
"no_limit");
2212 $this->tpl->setVariable(
"HITSOPTION", $hits_option);
2213 $this->tpl->parseCurrentBlock();
2218 $users_online_options = array(
"y",
"associated",
"n");
2220 if (isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"show_users_online"]))
2222 $selected_option =
$_SESSION[
"error_post_vars"][
"Fobject"][
"show_users_online"];
2226 $selected_option = $this->
object->prefs[
"show_users_online"];
2228 foreach($users_online_options as $an_option)
2230 $this->tpl->setCurrentBlock(
"show_users_online");
2232 if ($selected_option == $an_option)
2234 $this->tpl->setVariable(
"USERS_ONLINE_SELECTED",
"selected=\"selected\"");
2237 $this->tpl->setVariable(
"USERS_ONLINE_VALUE", $an_option);
2239 $this->tpl->setVariable(
"USERS_ONLINE_OPTION", $this->lng->txt(
"users_online_show_".$an_option));
2240 $this->tpl->parseCurrentBlock();
2245 if (isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"hide_own_online_status"]))
2247 $hide_own_online_status =
$_SESSION[
"error_post_vars"][
"Fobject"][
"hide_own_online_status"];
2251 $hide_own_online_status = ($this->
object->prefs[
"hide_own_online_status"] !=
'') ? $this->object->prefs[
"hide_own_online_status"] :
"n";
2253 $this->tpl->setCurrentBlock(
"hide_own_online_status");
2254 $this->tpl->setVariable(
"TXT_HIDE_OWN_ONLINE_STATUS", $this->lng->txt(
"hide_own_online_status"));
2255 if ($hide_own_online_status ==
"y") {
2256 $this->tpl->setVariable(
"CHK_HIDE_OWN_ONLINE_STATUS",
"checked=\"checked\"");
2259 $this->tpl->setVariable(
"CHK_HIDE_OWN_ONLINE_STATUS",
"");
2261 $this->tpl->parseCurrentBlock();
2265 $this->tpl->setCurrentBlock(
"inform_user");
2268 $sendInfoMail = $ilUser->getPref(
'send_info_mails') ==
'y';
2272 $this->tpl->setVariable(
"SEND_MAIL",
" checked=\"checked\"");
2275 $this->tpl->setVariable(
"TXT_INFORM_USER_MAIL", $this->lng->txt(
"inform_user_mail"));
2276 $this->tpl->parseCurrentBlock();
2278 $this->lng->loadLanguageModule(
'crs');
2280 $time_limit_unlimited =
$_SESSION[
"error_post_vars"][
"time_limit"][
"unlimited"] ?
2281 $_SESSION[
"error_post_vars"][
"time_limit"][
"unlimited"] :
2282 $this->
object->getTimeLimitUnlimited();
2283 $time_limit_from =
$_SESSION[
"error_post_vars"][
"time_limit"][
"from"] ?
2285 $this->
object->getTimeLimitFrom();
2287 $time_limit_until =
$_SESSION[
"error_post_vars"][
"time_limit"][
"until"] ?
2289 $this->
object->getTimeLimitUntil();
2291 $this->tpl->setCurrentBlock(
"time_limit");
2292 $this->tpl->setVariable(
"TXT_TIME_LIMIT", $this->lng->txt(
"time_limit"));
2293 $this->tpl->setVariable(
"TXT_TIME_LIMIT_UNLIMITED", $this->lng->txt(
"crs_unlimited"));
2294 $this->tpl->setVariable(
"TXT_TIME_LIMIT_FROM", $this->lng->txt(
"crs_from"));
2295 $this->tpl->setVariable(
"TXT_TIME_LIMIT_UNTIL", $this->lng->txt(
"crs_to"));
2297 $this->tpl->setVariable(
"TIME_LIMIT_UNLIMITED",
ilUtil::formCheckbox($time_limit_unlimited,
"time_limit[unlimited]",1));
2298 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_FROM_MINUTE",$this->
__getDateSelect(
"minute",
"time_limit[from][minute]",
2299 date(
"i",$time_limit_from)));
2300 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_FROM_HOUR",$this->
__getDateSelect(
"hour",
"time_limit[from][hour]",
2301 date(
"G",$time_limit_from)));
2302 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_FROM_DAY",$this->
__getDateSelect(
"day",
"time_limit[from][day]",
2303 date(
"d",$time_limit_from)));
2304 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_FROM_MONTH",$this->
__getDateSelect(
"month",
"time_limit[from][month]",
2305 date(
"m",$time_limit_from)));
2306 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_FROM_YEAR",$this->
__getDateSelect(
"year",
"time_limit[from][year]",
2307 date(
"Y",$time_limit_from)));
2308 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_UNTIL_MINUTE",$this->
__getDateSelect(
"minute",
"time_limit[until][minute]",
2309 date(
"i",$time_limit_until)));
2310 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_UNTIL_HOUR",$this->
__getDateSelect(
"hour",
"time_limit[until][hour]",
2311 date(
"G",$time_limit_until)));
2312 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_UNTIL_DAY",$this->
__getDateSelect(
"day",
"time_limit[until][day]",
2313 date(
"d",$time_limit_until)));
2314 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_UNTIL_MONTH",$this->
__getDateSelect(
"month",
"time_limit[until][month]",
2315 date(
"m",$time_limit_until)));
2316 $this->tpl->setVariable(
"SELECT_TIME_LIMIT_UNTIL_YEAR",$this->
__getDateSelect(
"year",
"time_limit[until][year]",
2317 date(
"Y",$time_limit_until)));
2318 $this->tpl->parseCurrentBlock();
2331 global $ilUser, $rbacsystem;
2335 !$rbacsystem->checkAccess(
'visible,read',$this->usrf_ref_id))
2337 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
2344 if(!$rbacsystem->checkAccess(
'cat_administrate_users',$this->object->getTimeLimitOwner()))
2346 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
2350 $userfile_input = $this->form_gui->getItemByPostVar(
"userfile");
2352 if ($_FILES[
"userfile"][
"tmp_name"] ==
"")
2354 if ($userfile_input->getDeletionFlag())
2356 $this->
object->removeUserPicture();
2360 if ($_FILES[
"userfile"][
"size"] == 0)
2367 $image_dir = $webspace_dir.
"/usr_images";
2368 $store_file =
"usr_".$this->object->getId().
".".
"jpg";
2371 $this->
object->setPref(
"profile_image", $store_file);
2372 $this->
object->update();
2375 $uploaded_file = $image_dir.
"/upload_".$this->
object->getId().
"pic";
2377 $uploaded_file,
false))
2380 $this->ctrl->redirect($this,
"showProfile");
2382 chmod($uploaded_file, 0770);
2386 $show_file =
"$image_dir/usr_".$this->object->getId().
".jpg";
2387 $thumb_file =
"$image_dir/usr_".$this->object->getId().
"_small.jpg";
2388 $xthumb_file =
"$image_dir/usr_".$this->object->getId().
"_xsmall.jpg";
2389 $xxthumb_file =
"$image_dir/usr_".$this->object->getId().
"_xxsmall.jpg";
2395 system(
ilUtil::getConvertCmd().
" $uploaded_file" .
"[0] -geometry 200x200 -quality 100 JPEG:$show_file");
2396 system(
ilUtil::getConvertCmd().
" $uploaded_file" .
"[0] -geometry 100x100 -quality 100 JPEG:$thumb_file");
2397 system(
ilUtil::getConvertCmd().
" $uploaded_file" .
"[0] -geometry 75x75 -quality 100 JPEG:$xthumb_file");
2398 system(
ilUtil::getConvertCmd().
" $uploaded_file" .
"[0] -geometry 30x30 -quality 100 JPEG:$xxthumb_file");
2408 $image_dir = $webspace_dir.
"/usr_images";
2409 $file = $image_dir.
"/usr_".$this->
object->getID().
".".
"jpg";
2410 $thumb_file = $image_dir.
"/usr_".$this->
object->getID().
"_small.jpg";
2411 $xthumb_file = $image_dir.
"/usr_".$this->
object->getID().
"_xsmall.jpg";
2412 $xxthumb_file = $image_dir.
"/usr_".$this->
object->getID().
"_xxsmall.jpg";
2413 $upload_file = $image_dir.
"/upload_".$this->
object->getID();
2416 $this->
object->setPref(
"profile_image",
"");
2417 $this->
object->update();
2420 if (@is_file(
$file))
2424 if (@is_file($thumb_file))
2426 unlink($thumb_file);
2428 if (@is_file($xthumb_file))
2430 unlink($xthumb_file);
2432 if (@is_file($xxthumb_file))
2434 unlink($xxthumb_file);
2436 if (@is_file($upload_file))
2438 unlink($upload_file);
2682 global
$ilias, $rbacsystem, $rbacadmin,$ilUser;
2684 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
2687 $settings = $ilias->getAllSettings();
2690 if($this->usrf_ref_id ==
USER_FOLDER_ID and !$rbacsystem->checkAccess(
'visible,read,write',$this->usrf_ref_id))
2692 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
2699 if(!$rbacsystem->checkAccess(
'cat_administrate_users',$this->object->getTimeLimitOwner()))
2701 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
2705 foreach ($_POST[
"Fobject"] as $key => $val)
2711 foreach ($settings as $key => $val)
2713 $field = substr($key,8);
2720 $require_keys[] = $field;
2724 $require_keys[] = $field;
2730 foreach ($require_keys as $key => $val)
2733 $system_fields = array(
"default_role");
2734 if (!in_array($val, $system_fields))
2736 if (isset($settings[
"require_" . $val]) && $settings[
"require_" . $val])
2738 if (empty($_POST[
"Fobject"][$val]))
2740 $this->ilias->raiseError($this->lng->txt(
"fill_out_all_required_fields") .
": " .
2741 $this->lng->txt($val),$this->ilias->error_obj->MESSAGE);
2749 $this->ilias->raiseError($this->lng->txt(
"fill_out_all_required_fields"),$this->ilias->error_obj->MESSAGE);
2752 if ($this->object->getLogin() != $_POST[
"Fobject"][
"login"] &&
2755 $this->ilias->raiseError($this->lng->txt(
"login_invalid"),$this->ilias->error_obj->MESSAGE);
2761 $this->ilias->raiseError($this->lng->txt(
"login_exists"),$this->ilias->error_obj->MESSAGE);
2766 if($_POST[
'Fobject'][
'passwd'] ==
"********" and
2767 !strlen($this->object->getPasswd()))
2769 $this->ilias->raiseError($this->lng->txt(
"fill_out_all_required_fields") .
": " .
2770 $this->lng->txt(
'password'),$this->ilias->error_obj->MESSAGE);
2773 if ($_POST[
"Fobject"][
"passwd"] != $_POST[
"Fobject"][
"passwd2"])
2775 $this->ilias->raiseError($this->lng->txt(
"passwd_not_match"),$this->ilias->error_obj->MESSAGE);
2781 $this->ilias->raiseError($this->lng->txt(
"passwd_invalid"),$this->ilias->error_obj->MESSAGE);
2787 $_POST[
'Fobject'][
'passwd'] =
"********";
2791 if(!strlen($_POST[
'Fobject'][
'ext_account']))
2793 $this->ilias->raiseError($this->lng->txt(
'ext_acccount_required'),$this->ilias->error_obj->MESSAGE);
2796 if($_POST[
'Fobject'][
'ext_account'] &&
2799 if($elogin != $this->object->getLogin())
2801 $this->ilias->raiseError(
2802 sprintf($this->lng->txt(
"err_auth_ext_user_exists"),
2803 $_POST[
"Fobject"][
"ext_account"],
2804 $_POST[
'Fobject'][
'auth_mode'],
2806 $this->ilias->error_obj->MESSAGE);
2812 include_once (
'./Services/User/classes/class.ilObjUser.php');
2816 if (strlen($_POST[
'Fobject'][
'email']) and !
ilUtil::is_email($_POST[
"Fobject"][
"email"]))
2818 $this->ilias->raiseError($this->lng->txt(
"email_not_valid"),$this->ilias->error_obj->MESSAGE);
2821 $start = $this->
__toUnix($_POST[
"time_limit"][
"from"]);
2822 $end = $this->
__toUnix($_POST[
"time_limit"][
"until"]);
2825 if (!$_POST[
"time_limit"][
"unlimited"] and
2828 $this->ilias->raiseError($this->lng->txt(
"time_limit_not_valid"),$this->ilias->error_obj->MESSAGE);
2831 if(!$this->ilias->account->getTimeLimitUnlimited())
2833 if($start < $this->ilias->account->getTimeLimitFrom() or
2834 $end > $this->ilias->account->getTimeLimitUntil() or
2835 $_POST[
'time_limit'][
'unlimited'])
2849 $_POST[
'Fobject'][
'time_limit_owner'] = $this->
object->getTimeLimitOwner();
2851 $_POST[
'Fobject'][
'time_limit_unlimited'] = (int) $_POST[
'time_limit'][
'unlimited'];
2852 $_POST[
'Fobject'][
'time_limit_from'] = $this->
__toUnix($_POST[
'time_limit'][
'from']);
2853 $_POST[
'Fobject'][
'time_limit_until'] = $this->
__toUnix($_POST[
'time_limit'][
'until']);
2855 if($_POST[
'Fobject'][
'time_limit_unlimited'] != $this->object->getTimeLimitUnlimited() or
2856 $_POST[
'Fobject'][
'time_limit_from'] != $this->
object->getTimeLimitFrom() or
2857 $_POST[
'Fobject'][
'time_limit_until'] != $this->
object->getTimeLimitUntil())
2859 $_POST[
'Fobject'][
'time_limit_message'] = 0;
2863 $_POST[
'Fobject'][
'time_limit_message'] = $this->
object->getTimeLimitMessage();
2866 $this->
object->assignData($_POST[
"Fobject"]);
2867 $this->
object->setUserDefinedData($_POST[
'udf']);
2869 $this->
object->updateLogin($_POST[
"Fobject"][
"login"]);
2870 $this->
object->setTitle($this->object->getFullname());
2871 $this->
object->setDescription($this->object->getEmail());
2872 $this->
object->setLanguage($_POST[
"Fobject"][
"language"]);
2875 $sknst = explode(
":", $_POST[
"Fobject"][
"skin_style"]);
2877 if ($this->object->getPref(
"style") != $sknst[1] ||
2878 $this->
object->getPref(
"skin") != $sknst[0])
2880 $this->
object->setPref(
"skin", $sknst[0]);
2881 $this->
object->setPref(
"style", $sknst[1]);
2885 $this->
object->setPref(
"hits_per_page", $_POST[
"Fobject"][
"hits_per_page"]);
2887 $this->
object->setPref(
"show_users_online", $_POST[
"Fobject"][
"show_users_online"]);
2889 if ($_POST[
"Fobject"][
"hide_own_online_status"]) {
2890 $this->
object->setPref(
"hide_own_online_status", $_POST[
"Fobject"][
"hide_own_online_status"]);
2893 $this->
object->setPref(
"hide_own_online_status",
"n");
2896 $this->update = $this->
object->update();
2901 $ilUser->setPref(
'send_info_mails', ($_POST[
'send_mail'] ==
'y') ?
'y' :
'n');
2902 $ilUser->writePrefs();
2906 $msg = $this->lng->txt(
'saved_successfully').$mail_message;
2911 if (strtolower(
$_GET[
"baseClass"]) ==
'iladministrationgui')
2913 $this->ctrl->redirectByClass(
"ilobjuserfoldergui",
"view");
2917 $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
2930 global $rbacsystem, $rbacadmin, $rbacreview;
2932 if (!$rbacsystem->checkAccess(
"edit_roleassignment", $this->usrf_ref_id))
2934 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_assign_role_to_user"),$this->ilias->error_obj->MESSAGE);
2937 $selected_roles = $_POST[
"role_id"] ? $_POST[
"role_id"] : array();
2938 $posted_roles = $_POST[
"role_id_ctrl"] ? $_POST[
"role_id_ctrl"] : array();
2941 if ($this->object->getId() == SYSTEM_USER_ID and in_array(SYSTEM_ROLE_ID, $posted_roles))
2943 array_push($selected_roles,SYSTEM_ROLE_ID);
2946 $global_roles_all = $rbacreview->getGlobalRoles();
2947 $assigned_roles_all = $rbacreview->assignedRoles($this->object->getId());
2948 $assigned_roles = array_intersect($assigned_roles_all,$posted_roles);
2949 $assigned_global_roles_all = array_intersect($assigned_roles_all,$global_roles_all);
2950 $assigned_global_roles = array_intersect($assigned_global_roles_all,$posted_roles);
2951 $posted_global_roles = array_intersect($selected_roles,$global_roles_all);
2953 if ((empty($selected_roles) and count($assigned_roles_all) == count($assigned_roles))
2954 or (empty($posted_global_roles) and count($assigned_global_roles_all) == count($assigned_global_roles)))
2958 ilUtil::sendInfo($this->lng->txt(
"msg_min_one_role").
"<br/>".$this->lng->txt(
"action_aborted"),
true);
2959 $this->ctrl->redirect($this,
'roleassignment');
2962 foreach (array_diff($assigned_roles,$selected_roles) as $role)
2964 $rbacadmin->deassignUser($role,$this->object->getId());
2967 foreach (array_diff($selected_roles,$assigned_roles) as $role)
2969 $rbacadmin->assignUser($role,$this->object->getId(),
false);
2972 include_once
"./Services/AccessControl/classes/class.ilObjRole.php";
2975 $this->
object->update();
2979 if(strtolower(
$_GET[
"baseClass"]) ==
'iladministrationgui')
2981 $this->ctrl->redirect($this,
'roleassignment');
2985 $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
2997 global $rbacreview,$rbacsystem,$ilUser;
2999 if (!$rbacsystem->checkAccess(
"edit_roleassignment", $this->usrf_ref_id))
3001 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_assign_role_to_user"),$this->ilias->error_obj->MESSAGE);
3004 $_SESSION[
'filtered_roles'] = isset($_POST[
'filter']) ? $_POST[
'filter'] :
$_SESSION[
'filtered_roles'];
3011 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.usr_role_assignment.html');
3015 $this->tpl->setCurrentBlock(
"filter");
3016 $this->tpl->setVariable(
"FILTER_TXT_FILTER",$this->lng->txt(
'filter'));
3018 $this->tpl->setVariable(
"FILTER_ACTION",$this->ctrl->getFormAction($this));
3019 $this->tpl->setVariable(
"FILTER_NAME",
'roleassignment');
3020 $this->tpl->setVariable(
"FILTER_VALUE",$this->lng->txt(
'apply_filter'));
3021 $this->tpl->parseCurrentBlock();
3025 $role_list = $rbacreview->getRolesByFilter(
$_SESSION[
"filtered_roles"],$this->object->getId());
3026 $assigned_roles = $rbacreview->assignedRoles($this->object->getId());
3030 include_once (
'./Services/AccessControl/classes/class.ilObjRole.php');
3032 foreach ($role_list as $role)
3035 $rolf = $rbacreview->getFoldersAssignedToRole($role[
"obj_id"],
true);
3038 if ($rbacreview->isDeleted($rolf[0]))
3046 if ($this->tree->isInTree($rolf[0]))
3048 if ($rolf[0] == ROLE_FOLDER_ID)
3050 $path = $this->lng->txt(
"global");
3054 $tmpPath = $this->tree->getPathFull($rolf[0]);
3067 $path = $tmpPath[count($tmpPath)-2][
"title"];
3072 $path =
"<b>Rolefolder ".$rolf[0].
" not found in tree! (Role ".$role[
"obj_id"].
")</b>";
3078 if (($this->object->getId() == SYSTEM_USER_ID and $role[
"obj_id"] == SYSTEM_ROLE_ID)
3079 or (!in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId())) and $role[
"obj_id"] == SYSTEM_ROLE_ID))
3084 if (substr($role[
"title"],0,3) ==
"il_")
3088 $rolf_arr = $rbacreview->getFoldersAssignedToRole($role[
"obj_id"],
true);
3089 $rolf2 = $rolf_arr[0];
3096 $parent_node = $this->tree->getParentNodeData($rolf2);
3098 $role[
"description"] = $this->lng->txt(
"obj_".$parent_node[
"type"]).
" (#".$parent_node[
"obj_id"].
")";
3101 $role_ids[$counter] = $role[
"obj_id"];
3103 $result_set[$counter][] = 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"].
"\"/>";
3104 $this->ctrl->setParameterByClass(
"ilobjrolegui",
"ref_id", $rolf[0]);
3105 $this->ctrl->setParameterByClass(
"ilobjrolegui",
"obj_id", $role[
"obj_id"]);
3106 $result_set[$counter][] =
"<a href=\"".$this->ctrl->getLinkTargetByClass(
"ilobjrolegui",
"perm").
"\">".
ilObjRole::_getTranslation($role[
"title"]).
"</a>";
3107 $result_set[$counter][] = $role[
"description"];
3108 $result_set[$counter][] = $path;
3121 for($i=0;$i<=60;$i++)
3123 $days[$i] = $i < 10 ?
"0".$i : $i;
3128 for($i=0;$i<24;$i++)
3130 $days[$i] = $i < 10 ?
"0".$i : $i;
3135 for($i=1;$i<32;$i++)
3137 $days[$i] = $i < 10 ?
"0".$i : $i;
3142 for($i=1;$i<13;$i++)
3144 $month[$i] = $i < 10 ?
"0".$i : $i;
3149 if($a_selected < date(
'Y',time()))
3151 $start = $a_selected;
3155 $start = date(
'Y',time());
3158 for($i = $start;$i < date(
"Y",time()) + 11;++$i)
3168 return mktime($a_time_arr[
"hour"],
3169 $a_time_arr[
"minute"],
3170 $a_time_arr[
"second"],
3171 $a_time_arr[
"month"],
3173 $a_time_arr[
"year"]);
3180 $actions = array(
"assignSave" => $this->lng->txt(
"change_assignment"));
3183 $tpl =& $tbl->getTemplateObject();
3185 $tpl->setCurrentBlock(
"tbl_form_header");
3186 $tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
3187 $tpl->parseCurrentBlock();
3189 $tpl->setCurrentBlock(
"tbl_action_row");
3191 $tpl->setVariable(
"COLUMN_COUNTS",4);
3194 foreach (
$actions as $name => $value)
3196 $tpl->setCurrentBlock(
"tbl_action_btn");
3197 $tpl->setVariable(
"BTN_NAME",$name);
3198 $tpl->setVariable(
"BTN_VALUE",$value);
3199 $tpl->parseCurrentBlock();
3202 if (!empty($a_role_ids))
3205 $tpl->setCurrentBlock(
"tbl_action_toggle_checkboxes");
3206 $tpl->setVariable(
"JS_VARNAME",
"role_id");
3208 $tpl->setVariable(
"TXT_CHECKALL", $this->lng->txt(
"check_all"));
3209 $tpl->setVariable(
"TXT_UNCHECKALL", $this->lng->txt(
"uncheck_all"));
3210 $tpl->parseCurrentBlock();
3213 $tpl->setVariable(
"TPLPATH",$this->tpl->tplPath);
3216 $this->ctrl->setParameter($this,
"cmd",
"roleassignment");
3219 $tbl->setTitle($this->lng->txt(
"edit_roleassignment"),
"icon_role.gif",$this->lng->txt(
"roles"));
3222 $tbl->setHeaderNames(array(
"",$this->lng->txt(
"role"),$this->lng->txt(
"description"),$this->lng->txt(
"context")));
3223 $tbl->setHeaderVars(array(
"",
"title",
"description",
"context"),$this->ctrl->getParameterArray($this,
"",
false));
3224 $tbl->setColumnWidth(array(
"",
"30%",
"40%",
"30%"));
3228 $this->tpl->setVariable(
"ROLES_TABLE",$tbl->tpl->get());
3235 include_once
"./Services/Table/classes/class.ilTableGUI.php";
3245 $order =
$_GET[
"sort_by"] ?
$_GET[
"sort_by"] :
"title";
3250 $tbl->setOrderColumn($order);
3251 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
3252 $tbl->setOffset(
$_GET[
"offset"]);
3253 $tbl->setLimit(
$_GET[
"limit"]);
3254 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
3255 $tbl->setData($result_set);
3265 $action[0] = $this->lng->txt(
'assigned_roles');
3266 $action[1] = $this->lng->txt(
'all_roles');
3267 $action[2] = $this->lng->txt(
'all_global_roles');
3268 $action[3] = $this->lng->txt(
'all_local_roles');
3269 $action[4] = $this->lng->txt(
'internal_local_roles_only');
3270 $action[5] = $this->lng->txt(
'non_internal_local_roles_only');
3289 $ilLocator->clearItems();
3291 if (
$_GET[
"admin_mode"] ==
"settings")
3293 $ilLocator->addItem($this->lng->txt(
"administration"),
3294 $this->ctrl->getLinkTargetByClass(
"iladministrationgui",
"frameset"),
3299 $ilLocator->addItem($this->lng->txt(
"obj_".ilObject::_lookupType(
3301 $this->ctrl->getLinkTargetByClass(
"ilobjuserfoldergui",
"view"));
3303 elseif (
$_GET[
'ref_id'] == ROLE_FOLDER_ID)
3305 $ilLocator->addItem($this->lng->txt(
"obj_".ilObject::_lookupType(
3307 $this->ctrl->getLinkTargetByClass(
"ilobjrolefoldergui",
"view"));
3310 if (
$_GET[
"obj_id"] > 0)
3312 $ilLocator->addItem($this->object->getTitle(),
3313 $this->ctrl->getLinkTarget($this,
"view"));
3326 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
3329 $this->ctrl->getLinkTargetByClass(
"ilobjuserfoldergui",
"view"));
3333 if ($this->object->getRefId() != ROOT_FOLDER_ID &&
3334 $this->
object->getRefId() != SYSTEM_FOLDER_ID)
3336 $par_id = $tree->getParentId($this->usrf_ref_id);
3337 $tpl->setUpperIcon(
"repository.php?ref_id=".$par_id);
3346 if($_POST[
'send_mail'] !=
'y')
3350 if(!strlen($this->object->getEmail()))
3356 $usr_lang =
new ilLanguage($this->object->getLanguage());
3358 $usr_lang->loadLanguageModule(
'registration');
3360 include_once
"Services/Mail/classes/class.ilMimeMail.php";
3363 $mmail->autoCheck(
false);
3364 $mmail->From($ilUser->getEmail());
3365 $mmail->To($this->object->getEmail());
3368 $subject = $usr_lang->txt(
"profile_changed");
3372 $body = ($usr_lang->txt(
"reg_mail_body_salutation").
" ".$this->
object->getFullname().
",\n\n");
3374 $date = $this->
object->getApproveDate();
3376 if((time() - strtotime($date)) < 10)
3378 $body .= ($usr_lang->txt(
'reg_mail_body_approve').
"\n\n");
3382 $body .= ($usr_lang->txt(
'reg_mail_body_profile_changed').
"\n\n");
3386 if($_POST[
'passwd'] !=
'********')
3388 $body .= $usr_lang->txt(
"reg_mail_body_text2").
"\n".
3389 ILIAS_HTTP_PATH.
"/login.php?client_id=".$ilias->client_id.
"\n".
3390 $usr_lang->txt(
"login").
": ".$this->
object->getLogin().
"\n".
3391 $usr_lang->txt(
"passwd").
": ".$_POST[
'passwd'].
"\n\n";
3393 $body .= ($usr_lang->txt(
"reg_mail_body_text3").
"\n");
3394 $body .= $this->
object->getProfileAsString($usr_lang);
3396 $mmail->Subject($subject);
3397 $mmail->Body($body);
3401 return "<br/>".$this->lng->txt(
"mail_sent");