4require_once 
"./Services/Object/classes/class.ilObjectGUI.php";
 
   27        function __construct($a_data,$a_id,$a_call_by_reference, $a_prepare_output = 
true)
 
   32                define(
'USER_FOLDER_ID',7);
 
   35                parent::__construct($a_data,$a_id,$a_call_by_reference,
false);
 
   37                $this->lng->loadLanguageModule(
'search');
 
   38                $this->lng->loadLanguageModule(
"user");
 
   40                $ilCtrl->saveParameter($this, 
"letter");
 
   45                $this->user_owner_id = $a_id;
 
   49                return $this->user_owner_id ? $this->user_owner_id : 
USER_FOLDER_ID;
 
   56                $next_class = $this->ctrl->getNextClass($this);
 
   57                $cmd = $this->ctrl->getCmd();
 
   62                        case 'ilusertablegui':
 
   63                                include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
 
   65                                $u_table->initFilter();
 
   66                                $this->ctrl->setReturn($this,
'view');
 
   67                                $this->ctrl->forwardCommand($u_table);
 
   70                        case 'ilpermissiongui':
 
   71                                include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
 
   73                                $ret =& $this->ctrl->forwardCommand($perm_gui);
 
   76                        case 'ilrepositorysearchgui':
 
   77                                include_once(
'./Services/Search/classes/class.ilRepositorySearchGUI.php');
 
   79                                $user_search->setTitle($this->lng->txt(
"search_user_extended")); 
 
   80                                $user_search->enableSearchableCheck(
false);
 
   81                                $user_search->setUserLimitations(
false);
 
   82                                $user_search->setCallback(
 
   84                                        'searchResultHandler',
 
   87                                $this->tabs_gui->setTabActive(
'search_user_extended');
 
   88                                $this->ctrl->setReturn($this,
'view');
 
   89                                $ret =& $this->ctrl->forwardCommand($user_search);
 
   92                        case 'ilaccountcodesgui':
 
   93                                $this->tabs_gui->setTabActive(
'settings');
 
   95                                $ilTabs->activateSubTab(
"account_codes");
 
   96                                include_once(
"./Services/User/classes/class.ilAccountCodesGUI.php");
 
   98                                $this->ctrl->forwardCommand($acc);
 
  101                        case 'ilcustomuserfieldsgui':
 
  102                                $this->tabs_gui->setTabActive(
'settings');
 
  104                                $ilTabs->activateSubTab(
"user_defined_fields");
 
  105                                include_once(
"./Services/User/classes/class.ilCustomUserFieldsGUI.php");
 
  107                                $this->ctrl->forwardCommand($cf);
 
  126                global $rbacsystem, 
$tpl;
 
  131                if (!$rbacsystem->checkAccess(
"read",$this->object->getRefId()) ||
 
  135                        $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
 
  138                include_once 
"Services/User/classes/class.ilUserLPTableGUI.php";
 
  150                include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
 
  152                $utab->resetOffset();
 
  153                $utab->resetFilter();
 
  166                $ilCtrl->setParameterByClass(
"ilobjusergui", 
"new_type", 
"usr");
 
  167                $ilCtrl->redirectByClass(array(
"iladministrationgui", 
"ilobjusergui"), 
"create");
 
  178                include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
 
  180                $utab->resetOffset();
 
  181                $utab->writeFilterToSession();
 
  183                $ilTabs->activateTab(
"usrf");
 
  195                include_once 
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
 
  197                if ($rbacsystem->checkAccess(
'create_usr', $this->object->getRefId()) ||
 
  198                        $rbacsystem->checkAccess(
'cat_administrate_users', $this->object->getRefId()))
 
  201                        $button->setCaption(
"usr_add");
 
  202                        $button->setUrl($this->ctrl->getLinkTarget($this, 
"addUser"));
 
  203                        $ilToolbar->addButtonInstance($button);
 
  206                        $button->setCaption(
"import_users");
 
  207                        $button->setUrl($this->ctrl->getLinkTarget($this, 
"importUserForm"));
 
  208                        $ilToolbar->addButtonInstance($button);
 
  212                include_once 
'./Services/User/classes/class.ilUserAccountSettings.php';
 
  214                if ((
int) 
$ilSetting->get(
'user_adm_alpha_nav'))
 
  216                        $ilToolbar->addSeparator();
 
  219                        include_once(
"./Services/Form/classes/class.ilAlphabetInputGUI.php");
 
  221                        include_once(
"./Services/User/classes/class.ilObjUser.php");
 
  227                        $ai->setParentCommand($this, 
"chooseLetter");
 
  228                        $ai->setHighlighted(
$_GET[
"letter"]);
 
  229                        $ilToolbar->addInputItem(
$ai, 
true);
 
  233                include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
 
  235                $tpl->setContent($utab->getHTML());
 
  243                include_once 
'./Services/User/classes/class.ilUserAutoComplete.php';
 
  245                $auto->setSearchFields(array(
'login',
'firstname',
'lastname',
'email'));
 
  246                $auto->enableFieldSearchableCheck(
false);
 
  247                $auto->setMoreLinkAvailable(
true);
 
  249                if(($_REQUEST[
'fetchall']))
 
  254                echo $auto->getList($_REQUEST[
'term']);
 
  268                $ilCtrl->redirect($this, 
"view");
 
  282                $operations = array();
 
  284                if ($this->actions == 
"")
 
  287                                "delete" => array(
"name" => 
"delete", 
"lng" => 
"delete"),
 
  288                                "activate" => array(
"name" => 
"activate", 
"lng" => 
"activate"),
 
  289                                "deactivate" => array(
"name" => 
"deactivate", 
"lng" => 
"deactivate"),
 
  290                                "accessRestrict" => array(
"name" => 
"accessRestrict", 
"lng" => 
"accessRestrict"),
 
  291                                "accessFree" => array(
"name" => 
"accessFree", 
"lng" => 
"accessFree"),
 
  292                                "export" => array(
"name" => 
"export", 
"lng" => 
"export")
 
  301                        if ($rbacsystem->checkAccess(
$row[
"name"],$this->object->getRefId()))
 
  303                                $operations[] = 
$row;
 
  307                if (count($operations) > 0)
 
  309                        $select = 
"<select name=\"selectedAction\">\n";
 
  310                        foreach ($operations as $val)
 
  312                                $select .= 
"<option value=\"" . $val[
"name"] . 
"\"";
 
  313                                if (strcmp(
$_POST[
"selectedAction"], $val[
"name"]) == 0)
 
  315                                        $select .= 
" selected=\"selected\"";
 
  318                                $select .= $this->lng->txt($val[
"lng"]);
 
  319                                $select .= 
"</option>";
 
  321                        $select .= 
"</select>";
 
  322                        $this->tpl->setCurrentBlock(
"tbl_action_select");
 
  323                        $this->tpl->setVariable(
"SELECT_ACTION", $select);
 
  324                        $this->tpl->setVariable(
"BTN_NAME", 
"userAction");
 
  325                        $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"submit"));
 
  326                        $this->tpl->parseCurrentBlock();
 
  329                if ($with_subobjects === 
true)
 
  334                if ((count($operations) > 0) or $subobjs === 
true)
 
  336                        $this->tpl->setCurrentBlock(
"tbl_action_row");
 
  337                        $this->tpl->setVariable(
"COLUMN_COUNTS",count($this->data[
"cols"]));
 
  339                        $this->tpl->setVariable(
"ALT_ARROW", $this->lng->txt(
"actions"));
 
  340                        $this->tpl->parseCurrentBlock();
 
  354                $d = $this->objDefinition->getCreatableSubObjects($this->object->getType());
 
  356                if (!$rbacsystem->checkAccess(
'create_usr',$this->object->getRefId()))
 
  369                                        for ($i=0; $i<count($this->data[
"ctrl"]); $i++)
 
  371                                                if ($this->data[
"ctrl"][$i][
"type"] == 
$row[
"name"])
 
  377                                if (
$row[
"max"] == 
"" || $count < 
$row[
"max"])
 
  379                                        $subobj[] = 
$row[
"name"];
 
  384                if (is_array($subobj))
 
  388                        $this->tpl->setCurrentBlock(
"add_object");
 
  389                        $this->tpl->setVariable(
"SELECT_OBJTYPE", $opts);
 
  390                        $this->tpl->setVariable(
"BTN_NAME", 
"create");
 
  391                        $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"add"));
 
  392                        $this->tpl->parseCurrentBlock();
 
  402                $this->ctrl->redirect($this, 
'view');
 
  407                $this->ctrl->redirectByClass(
'ilrepositorysearchgui', 
'showSearchResults');
 
  420                if (!$rbacsystem->checkAccess(
'write',$this->object->getRefId()))
 
  422                        $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->ilias->error_obj->WARNING);
 
  426                foreach (
$_POST[
"id"] as $id)
 
  429                        $obj =& $this->
ilias->obj_factory->getInstanceByObjId($id);
 
  430                        $obj->setActive(TRUE, 
$ilUser->getId());
 
  438                        $this->ctrl->redirectByClass(
'ilRepositorySearchGUI',
'show');                   
 
  442                        $this->ctrl->redirect($this, 
"view");
 
  456                if (!$rbacsystem->checkAccess(
'write',$this->object->getRefId()))
 
  458                        $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->ilias->error_obj->WARNING);
 
  462                foreach (
$_POST[
"id"] as $id)
 
  465                        $obj =& $this->
ilias->obj_factory->getInstanceByObjId($id);
 
  466                        $obj->setActive(FALSE, 
$ilUser->getId());
 
  475                        $this->ctrl->redirectByClass(
'ilRepositorySearchGUI',
'show');                   
 
  479                        $this->ctrl->redirect($this, 
"view");
 
  488                if (!$rbacsystem->checkAccess(
'write',$this->object->getRefId()))
 
  490                        $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->ilias->error_obj->WARNING);
 
  494                foreach (
$_POST[
"id"] as $id)
 
  497                        $obj = $this->
ilias->obj_factory->getInstanceByObjId($id);
 
  498                        $obj->setTimeLimitUnlimited(1);
 
  499                        $obj->setTimeLimitFrom(
"");
 
  500                        $obj->setTimeLimitUntil(
"");
 
  501                        $obj->setTimeLimitMessage(0);
 
  510                        $this->ctrl->redirectByClass(
'ilRepositorySearchGUI',
'show');                   
 
  514                        $this->ctrl->redirect($this, 
"view");
 
  524                $this->tpl->setContent($a_form->getHTML());
 
  539                include_once 
"Services/Form/classes/class.ilPropertyFormGUI.php";
 
  541                $form->setTitle($this->lng->txt(
"time_limit_add_time_limit_for_selected"));
 
  542                $form->setFormAction($this->ctrl->getFormAction($this, 
"confirmaccessRestrict"));
 
  545                $from->setShowTime(
true);
 
  546                $from->setRequired(
true);
 
  547                $form->addItem($from);
 
  550                $to->setRequired(
true);
 
  551                $to->setShowTime(
true);
 
  554                $form->addCommandButton(
"confirmaccessRestrict", $this->lng->txt(
"confirm"));
 
  555                $form->addCommandButton(
"view", $this->lng->txt(
"cancel"));
 
  557                foreach($user_ids as $user_id)
 
  560                        $ufield->setValue($user_id);
 
  561                        $form->addItem($ufield);
 
  565                if($a_from_search || 
$_POST[
"frsrch"])
 
  569                        $form->addItem($field);
 
  578                if(!$form->checkInput())
 
  583                $timefrom = $form->getItemByPostVar(
"from")->getDate()->get(
IL_CAL_UNIX);
 
  584                $timeuntil = $form->getItemByPostVar(
"to")->getDate()->get(
IL_CAL_UNIX);
 
  585                if ($timeuntil <= $timefrom)
 
  594                if (!$rbacsystem->checkAccess(
'write',$this->object->getRefId()))
 
  596                        $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->ilias->error_obj->WARNING);
 
  600                foreach (
$_POST[
"id"] as $id)
 
  603                        $obj = $this->
ilias->obj_factory->getInstanceByObjId($id);
 
  604                        $obj->setTimeLimitUnlimited(0);
 
  605                        $obj->setTimeLimitFrom($timefrom);
 
  606                        $obj->setTimeLimitUntil($timeuntil);
 
  607                        $obj->setTimeLimitMessage(0);
 
  616                        $this->ctrl->redirectByClass(
'ilRepositorySearchGUI',
'show');                   
 
  620                        $this->ctrl->redirect($this, 
"view");
 
  634                if (!$rbacsystem->checkAccess(
'delete',$this->object->getRefId()))
 
  637                        $ilCtrl->redirect($this, 
"view");
 
  642                        $this->
ilias->raiseError($this->lng->txt(
"msg_no_delete_yourself"),$this->ilias->error_obj->WARNING);
 
  646                foreach (
$_POST[
"id"] as $id)
 
  649                        $obj =& $this->
ilias->obj_factory->getInstanceByObjId($id);
 
  658                        $this->ctrl->redirectByClass(
'ilRepositorySearchGUI',
'show');                   
 
  662                        $this->ctrl->redirect($this, 
"view");
 
  673                if(
$_POST[
"select_cmd_all"])
 
  675                        include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
 
  677                        return $utab->getUserIdsForFilter();
 
  695                        $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
 
  700                        $ilTabs->activateTab(
"obj_usrf");
 
  704                        $ilTabs->activateTab(
"search_user_extended");
 
  707                if (strcmp($action, 
"accessRestrict") == 0) 
 
  711                if (strcmp($action, 
"mail") == 0) 
 
  720                        $cancel = 
"cancelUserFolderAction";
 
  724                        $cancel = 
"cancelSearchAction";                                                 
 
  728                include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
  730                $cgui->setFormAction($this->ctrl->getFormAction($this));
 
  731                $cgui->setHeaderText($this->lng->txt(
"info_" . $action . 
"_sure"));
 
  732                $cgui->setCancel($this->lng->txt(
"cancel"), $cancel);
 
  733                $cgui->setConfirm($this->lng->txt(
"confirm"), 
"confirm" . $action);
 
  737                        $cgui->addHiddenItem(
"frsrch", 1);
 
  740                foreach($user_ids as $id)
 
  744                        $login = $user->getLastLogin();
 
  747                                $login = $this->lng->txt(
"never");
 
  754                        $caption = $user->getFullname().
" (".$user->getLogin().
")".
", ".
 
  755                                $user->getEmail().
" -  ".$this->lng->txt(
"last_login").
": ".$login;
 
  757                        $cgui->addItem(
"id[]", $id, $caption);
 
  760                $this->tpl->setContent($cgui->getHTML());
 
  770                $_POST[
"selectedAction"] = 
"delete";
 
  779                $_POST[
"selectedAction"] = 
"activate";
 
  788                $_POST[
"selectedAction"] = 
"deactivate";
 
  797                $_POST[
"selectedAction"] = 
"accessRestrict";
 
  806                $_POST[
"selectedAction"] = 
"accessFree";
 
  820                global 
$tpl, $rbacsystem;
 
  823                if (
$_GET[
"baseClass"] == 
'ilRepositoryGUI')
 
  825                        $this->tabs_gui->clearTargets();
 
  828                if (!$rbacsystem->checkAccess(
"write", $this->object->getRefId()))
 
  830                        $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
 
  834                $tpl->setContent($this->form->getHTML());
 
  846                include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  850                include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
 
  852                $fi->setSuffixes(array(
"xml", 
"zip"));
 
  855                $this->form->addItem($fi);
 
  857                $this->form->addCommandButton(
"importUserRoleAssignment", 
$lng->txt(
"import"));
 
  858                $this->form->addCommandButton(
"importCancelled", 
$lng->txt(
"cancel"));
 
  860                $this->form->setTitle(
$lng->txt(
"import_users"));
 
  861                $this->form->setFormAction(
$ilCtrl->getFormAction($this));
 
  874                if (@is_dir($import_dir))
 
  879                if (strtolower(
$_GET[
"baseClass"]) == 
'iladministrationgui')
 
  881                        $this->ctrl->redirect($this, 
"view");
 
  886                        $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
 
  912                if (
$_GET[
"baseClass"] == 
'ilRepositoryGUI')
 
  914                        $this->tabs_gui->clearTargets();
 
  918                if ($this->form->checkInput())
 
  920                        include_once 
'./Services/AccessControl/classes/class.ilObjRole.php';
 
  921                        include_once 
'./Services/User/classes/class.ilUserImportParser.php';
 
  923                        global $rbacreview, $rbacsystem, 
$tree, 
$lng;
 
  926                        $this->tpl->addBlockfile(
"ADM_CONTENT", 
"adm_content", 
"tpl.usr_import_roles.html", 
"Services/User");
 
  931                        if (@is_dir($import_dir))
 
  938                        $file_name = $_FILES[
"importFile"][
"name"];
 
  939                        $parts = pathinfo($file_name);
 
  940                        $full_path = $import_dir.
"/".$file_name;
 
  943                        if (!is_file($_FILES[
"importFile"][
"tmp_name"]))
 
  946                                $this->
ilias->raiseError($this->lng->txt(
"no_import_file_found")
 
  947                                        , $this->ilias->error_obj->MESSAGE);
 
  950                                $_FILES[
"importFile"][
"name"], $full_path);
 
  953                        if (strtolower($parts[
"extension"]) == 
"zip")
 
  960                                foreach ($file_list as $a_file)
 
  962                                        if (substr($a_file[
'entry'],-4) == 
'.xml')
 
  964                                                $xml_file = $import_dir.
"/".$a_file[
'entry'];
 
  968                                if (is_null($xml_file))
 
  970                                        $subdir = basename($parts[
"basename"],
".".$parts[
"extension"]);
 
  971                                        $xml_file = $import_dir.
"/".$subdir.
"/".$subdir.
".xml";
 
  977                                $xml_file = $full_path;
 
  981                        if (!is_file($xml_file))
 
  984                                $this->
ilias->raiseError($this->lng->txt(
"no_xml_file_found_in_zip")
 
  985                                        .
" ".$subdir.
"/".$subdir.
".xml", $this->ilias->error_obj->MESSAGE);
 
  988                        require_once(
"./Services/User/classes/class.ilUserImportParser.php");
 
  993                        $importParser->startParsing();
 
  994                        switch ($importParser->getErrorLevel())
 
  999                                        $this->tpl->setVariable(
"IMPORT_LOG", $importParser->getProtocolAsHTML(
$lng->txt(
"verification_warning_log")));
 
 1003                                        $this->
ilias->raiseError(
 
 1004                                                $lng->txt(
"verification_failed").$importParser->getProtocolAsHTML(
$lng->txt(
"verification_failure_log")),
 
 1005                                                $this->ilias->error_obj->MESSAGE
 
 1012                        $this->tpl->setCurrentBlock(
"role_selection_form");
 
 1013                        $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
 
 1014                        $this->tpl->setVariable(
"TXT_IMPORT_USERS", $this->lng->txt(
"import_users"));
 
 1015                        $this->tpl->setVariable(
"TXT_IMPORT_FILE", $this->lng->txt(
"import_file"));
 
 1016                        $this->tpl->setVariable(
"IMPORT_FILE", $file_name);
 
 1017                        $this->tpl->setVariable(
"TXT_USER_ELEMENT_COUNT", $this->lng->txt(
"num_users"));
 
 1018                        $this->tpl->setVariable(
"USER_ELEMENT_COUNT", $importParser->getUserCount());
 
 1019                        $this->tpl->setVariable(
"TXT_ROLE_ASSIGNMENT", $this->lng->txt(
"role_assignment"));
 
 1020                        $this->tpl->setVariable(
"BTN_IMPORT", $this->lng->txt(
"import"));
 
 1021                        $this->tpl->setVariable(
"BTN_CANCEL", $this->lng->txt(
"cancel"));
 
 1022                        $this->tpl->setVariable(
"XML_FILE_NAME", $xml_file);
 
 1026                        $importParser->startParsing();
 
 1027                        $roles = $importParser->getCollectedRoles();
 
 1030                        $all_gl_roles = $rbacreview->getRoleListByObject(ROLE_FOLDER_ID);
 
 1031                        $gl_roles = array();
 
 1032                        $roles_of_user = $rbacreview->assignedRoles(
$ilUser->getId());
 
 1033                        foreach ($all_gl_roles as $obj_data)
 
 1044                                if ($obj_data[
"obj_id"] != ANONYMOUS_ROLE_ID)
 
 1047                                        if ($obj_data[
"obj_id"] != SYSTEM_ROLE_ID or in_array(SYSTEM_ROLE_ID,$roles_of_user))
 
 1049                                                $gl_roles[$obj_data[
"obj_id"]] = $obj_data[
"title"];
 
 1055                        $got_globals = 
false;
 
 1056                        foreach($roles as $role_id => $role)
 
 1058                                if ($role[
"type"] == 
"Global")
 
 1062                                                $got_globals = 
true;
 
 1064                                                $this->tpl->setCurrentBlock(
"global_role_section");
 
 1065                                                $this->tpl->setVariable(
"TXT_GLOBAL_ROLES_IMPORT", $this->lng->txt(
"roles_of_import_global"));
 
 1066                                                $this->tpl->setVariable(
"TXT_GLOBAL_ROLES", $this->lng->txt(
"assign_global_role"));
 
 1070                                        $pre_select = array_search($role[name], $gl_roles);
 
 1073                                                switch($role[
"name"])
 
 1075                                                        case "Administrator":   
 
 1076                                                                $pre_select = array_search(
"Administrator", $gl_roles);
 
 1080                                                                $pre_select = array_search(
"User", $gl_roles);
 
 1084                                                                $pre_select = array_search(
"User", $gl_roles);
 
 1088                                                                $pre_select = array_search(
"Guest", $gl_roles);
 
 1092                                                                $pre_select = array_search(
"User", $gl_roles);
 
 1096                                        $this->tpl->setCurrentBlock(
"global_role");
 
 1097                                        $role_select = 
ilUtil::formSelect($pre_select, 
"role_assign[".$role_id.
"]", $gl_roles, 
false, 
true);
 
 1098                                        $this->tpl->setVariable(
"TXT_IMPORT_GLOBAL_ROLE", $role[
"name"].
" [".$role_id.
"]");
 
 1099                                        $this->tpl->setVariable(
"SELECT_GLOBAL_ROLE", $role_select);
 
 1100                                        $this->tpl->parseCurrentBlock();
 
 1105                        $got_locals = 
false;
 
 1106                        foreach($roles as $role_id => $role)
 
 1108                                if ($role[
"type"] == 
"Local")
 
 1117                                $this->tpl->setCurrentBlock(
"local_role_section");
 
 1118                                $this->tpl->setVariable(
"TXT_LOCAL_ROLES_IMPORT", $this->lng->txt(
"roles_of_import_local"));
 
 1119                                $this->tpl->setVariable(
"TXT_LOCAL_ROLES", $this->lng->txt(
"assign_local_role"));
 
 1130                                        $loc_roles = array();
 
 1131                                        require_once 
'Services/Mail/classes/Address/Type/class.ilMailRoleAddressType.php';
 
 1132                                        foreach($roles as $role_id => $role)
 
 1134                                                if ($role[
"type"] == 
"Local")
 
 1136                                                        $searchName = (substr($role[
'name'],0,1) == 
'#') ? $role[
'name'] : 
'#'.$role[
'name'];
 
 1137                                                        $matching_role_ids = ilMailRoleAddressType::searchRolesByMailboxAddressList($searchName);
 
 1138                                                        foreach ($matching_role_ids as $mid) {
 
 1139                                                                if (! in_array($mid, $loc_roles)) {
 
 1140                                                                        $loc_roles[] = $mid;
 
 1149                                        $loc_roles = $rbacreview->getAssignableRolesInSubtree($this->object->getRefId());
 
 1154                                $l_roles_mailbox_searcharray = array();
 
 1155                                require_once 
'Services/Mail/classes/Address/Type/class.ilMailRoleAddressType.php';
 
 1156                                foreach ($loc_roles as $key => $loc_role)
 
 1159                                        $rolf = $rbacreview->getFoldersAssignedToRole($loc_role,
true);
 
 1166                                                !$rbacreview->isDeleted($rolf[0]) &&
 
 1167                                                $rbacsystem->checkAccess(
'write',$rolf[0]) &&
 
 1168                                                $rolf[0] != ROLE_FOLDER_ID
 
 1181                                                $path_array = array();
 
 1182                                                if ($this->tree->isInTree($rolf[0]))
 
 1186                                                        $tmpPath = $this->tree->getPathFull($rolf[0]);
 
 1187                                                        $tmpPath[] = $rolf[0];
 
 1189                                                        for ($i = 1, 
$n = count($tmpPath) - 1; $i < 
$n; $i++)
 
 1191                                                                if ($i < 3 || $i > 
$n - 3)
 
 1193                                                                        $path_array[] = $tmpPath[$i][
'title'];
 
 1195                                                                else if ($i == 3 || $i == 
$n - 3)
 
 1197                                                                        $path_array[] = 
'...';
 
 1200                                                                $isInSubtree |= $tmpPath[$i][
'obj_id'] == $this->
object->getId();
 
 1203                                                        $path = implode(
" < ", array_reverse($path_array));
 
 1208                                                        $path = 
"<b>Rolefolder ".$rolf[0].
" not found in tree! (Role ".$loc_role.
")</b>";
 
 1210                                                $roleMailboxAddress = ilMailRoleAddressType::getRoleMailboxAddress($loc_role);
 
 1211                                                $l_roles[$loc_role] = $roleMailboxAddress.
', '.
$path;
 
 1216                                natcasesort($l_roles);
 
 1217                                $l_roles[
""] = $this->lng->txt(
"usrimport_ignore_role");
 
 1218                                require_once 
'Services/Mail/classes/Address/Type/class.ilMailRoleAddressType.php';
 
 1219                                foreach($roles as $role_id => $role)
 
 1221                                        if ($role[
"type"] == 
"Local")
 
 1223                                                $this->tpl->setCurrentBlock(
"local_role");
 
 1224                                                $this->tpl->setVariable(
"TXT_IMPORT_LOCAL_ROLE", $role[
"name"]);
 
 1225                                                $searchName = (substr($role[
'name'],0,1) == 
'#') ? $role[
'name'] : 
'#'.$role[
'name'];
 
 1226                                                $matching_role_ids = ilMailRoleAddressType::searchRolesByMailboxAddressList($searchName);
 
 1227                                                $pre_select = count($matching_role_ids) == 1 ? $matching_role_ids[0] : 
"";
 
 1232                                                        $selectable_roles = array();
 
 1233                                                        $selectable_roles[
""] =  $this->lng->txt(
"usrimport_ignore_role");
 
 1234                                                        foreach ($matching_role_ids as $id)
 
 1236                                                                $selectable_roles[$id] =  $l_roles[$id];
 
 1238                                                        $role_select = 
ilUtil::formSelect($pre_select, 
"role_assign[".$role_id.
"]", $selectable_roles, 
false, 
true);
 
 1240                                                        $role_select = 
ilUtil::formSelect($pre_select, 
"role_assign[".$role_id.
"]", $l_roles, 
false, 
true);
 
 1242                                                $this->tpl->setVariable(
"SELECT_LOCAL_ROLE", $role_select);
 
 1243                                                $this->tpl->parseCurrentBlock();
 
 1249                        $this->tpl->setVariable(
"TXT_CONFLICT_HANDLING", 
$lng->txt(
"conflict_handling"));
 
 1254                        $this->tpl->setVariable(
"TXT_CONFLICT_HANDLING_INFO", str_replace(
'\n',
'<br>',$this->lng->txt(
"usrimport_conflict_handling_info")));
 
 1255                        $this->tpl->setVariable(
"TXT_CONFLICT_CHOICE", 
$lng->txt(
"conflict_handling"));
 
 1259                        $this->lng->loadLanguageModule(
"mail");
 
 1260                        include_once 
'./Services/User/classes/class.ilObjUserFolder.php';
 
 1262                        if (trim($amail[
"body"]) != 
"" && trim($amail[
"subject"]) != 
"")
 
 1264                                $this->tpl->setCurrentBlock(
"inform_user");
 
 1265                                $this->tpl->setVariable(
"TXT_ACCOUNT_MAIL", 
$lng->txt(
"mail_account_mail"));
 
 1268                                        $this->tpl->setVariable(
"SEND_MAIL", 
" checked=\"checked\"");
 
 1270                                $this->tpl->setVariable(
"TXT_INFORM_USER_MAIL",
 
 1271                                        $this->lng->txt(
"user_send_new_account_mail"));
 
 1272                                $this->tpl->parseCurrentBlock();
 
 1277                        $this->form->setValuesByPost();
 
 1278                        $tpl->setContent($this->form->getHtml());
 
 1290                if (
$_GET[
"baseClass"] == 
'ilRepositoryGUI')
 
 1292                        $this->tabs_gui->clearTargets();
 
 1295                include_once 
'./Services/AccessControl/classes/class.ilObjRole.php';
 
 1296                include_once 
'./Services/User/classes/class.ilUserImportParser.php';
 
 1298                global $rbacreview, $rbacsystem, 
$tree, 
$lng;
 
 1300                switch (
$_POST[
"conflict_handling_choice"])
 
 1302                        case "update_on_conflict" :
 
 1305                        case "ignore_on_conflict" :
 
 1317                if (
$_POST[
"role_assign"])
 
 1319                        $global_roles = $rbacreview->getGlobalRoles();
 
 1320                        $roles_of_user = $rbacreview->assignedRoles(
$ilUser->getId());
 
 1321                        foreach (
$_POST[
"role_assign"] as $role_id)
 
 1325                                        if (in_array($role_id, $global_roles))
 
 1327                                                if(!in_array(SYSTEM_ROLE_ID,$roles_of_user))
 
 1329                                                        if ($role_id == SYSTEM_ROLE_ID && ! in_array(SYSTEM_ROLE_ID,$roles_of_user)
 
 1335                                                                $this->
ilias->raiseError($this->lng->txt(
"usrimport_with_specified_role_not_permitted"), 
 
 1336                                                                        $this->ilias->error_obj->MESSAGE);
 
 1342                                                $rolf = $rbacreview->getFoldersAssignedToRole($role_id,
true);
 
 1343                                                if ($rbacreview->isDeleted($rolf[0])
 
 1344                                                        || ! $rbacsystem->checkAccess(
'write',$rolf[0]))
 
 1347                                                        $this->
ilias->raiseError($this->lng->txt(
"usrimport_with_specified_role_not_permitted"), 
 
 1348                                                                $this->ilias->error_obj->MESSAGE);
 
 1356                $importParser->setRoleAssignment(
$_POST[
"role_assign"]);
 
 1357                $importParser->startParsing();
 
 1362                switch ($importParser->getErrorLevel())
 
 1368                                ilUtil::sendInfo($this->lng->txt(
"user_imported_with_warnings").$importParser->getProtocolAsHTML(
$lng->txt(
"import_warning_log")), 
true);
 
 1371                                $this->
ilias->raiseError(
 
 1372                                        $this->lng->txt(
"user_import_failed")
 
 1373                                        .$importParser->getProtocolAsHTML(
$lng->txt(
"import_failure_log")),
 
 1374                                        $this->ilias->error_obj->MESSAGE
 
 1379                if (strtolower(
$_GET[
"baseClass"]) == 
"iladministrationgui")
 
 1381                        $this->ctrl->redirect($this, 
"view");
 
 1386                        $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
 
 1392        parent::hitsperpageObject();
 
 1406                include_once 
'./Services/User/classes/class.ilUserAccountSettings.php';
 
 1409                $show_blocking_time_in_days = 
$ilSetting->get(
'loginname_change_blocking_time') / 86400;
 
 1410                $show_blocking_time_in_days = (float)$show_blocking_time_in_days;
 
 1412                include_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
 
 1415                $this->form->setValuesByArray(
 
 1417                                'lua'   => $aset->isLocalUserAdministrationEnabled(),
 
 1418                                'lrua'  => $aset->isUserAccessRestricted(),
 
 1419                                'allow_change_loginname' => (
bool)
$ilSetting->get(
'allow_change_loginname'),
 
 1420                                'create_history_loginname' => (
bool)
$ilSetting->get(
'create_history_loginname'),
 
 1421                                'reuse_of_loginnames' => (
bool)
$ilSetting->get(
'reuse_of_loginnames'),
 
 1422                                'loginname_change_blocking_time' => (
float)$show_blocking_time_in_days,
 
 1423                                'user_adm_alpha_nav' => (
int)
$ilSetting->get(
'user_adm_alpha_nav'),
 
 1425                                'user_reactivate_code' => (
int)
$ilSetting->get(
'user_reactivate_code'),
 
 1426                                'user_own_account' => (
int)
$ilSetting->get(
'user_delete_own_account'),
 
 1427                                'user_own_account_email' => 
$ilSetting->get(
'user_delete_own_account_email'),
 
 1430                                'session_reminder_enabled' => 
$ilSetting->get(
'session_reminder_enabled'),
 
 1436                                'password_change_on_first_login_enabled' => $security->isPasswordChangeOnFirstLoginEnabled() ? 1 : 0,
 
 1437                                'password_must_not_contain_loginame' => $security->getPasswordMustNotContainLoginnameStatus() ? 1 : 0,                                                                                                  
 
 1438                                'password_chars_and_numbers_enabled' => $security->isPasswordCharsAndNumbersEnabled() ? 1 : 0,
 
 1439                                'password_special_chars_enabled' => $security->isPasswordSpecialCharsEnabled() ? 1 : 0 ,
 
 1440                                'password_min_length' => $security->getPasswordMinLength(),
 
 1441                                'password_max_length' => $security->getPasswordMaxLength(),
 
 1442                                'password_ucase_chars_num' => $security->getPasswordNumberOfUppercaseChars(),
 
 1443                                'password_lowercase_chars_num' => $security->getPasswordNumberOfLowercaseChars(),
 
 1444                                'password_max_age' => $security->getPasswordMaxAge(),
 
 1446                                'login_max_attempts' => $security->getLoginMaxAttempts(),                               
 
 1447                                'ps_prevent_simultaneous_logins' => (
int)$security->isPreventionOfSimultaneousLoginsEnabled(),
 
 1448                                'password_assistance' => (
bool)
$ilSetting->get(
"password_assistance")
 
 1452                $this->tpl->setContent($this->form->getHTML());
 
 1465                if($this->form->checkInput())
 
 1469                        if(!strlen($this->form->getInput(
'loginname_change_blocking_time')))
 
 1472                                $this->form->getItemByPostVar(
'loginname_change_blocking_time')
 
 1473                                                                                ->setAlert($this->lng->txt(
'loginname_change_blocking_time_invalidity_info'));
 
 1476                        include_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
 
 1480                        $security->setPasswordCharsAndNumbersEnabled((
bool) 
$_POST[
"password_chars_and_numbers_enabled"]);
 
 1481                        $security->setPasswordSpecialCharsEnabled((
bool) 
$_POST[
"password_special_chars_enabled"]);
 
 1482                        $security->setPasswordMinLength((
int) 
$_POST[
"password_min_length"]);
 
 1483                        $security->setPasswordMaxLength((
int) 
$_POST[
"password_max_length"]);
 
 1484                        $security->setPasswordNumberOfUppercaseChars((
int) 
$_POST[
'password_ucase_chars_num']);
 
 1485                        $security->setPasswordNumberOfLowercaseChars((
int) 
$_POST[
'password_lowercase_chars_num']);
 
 1486                        $security->setPasswordMaxAge((
int) 
$_POST[
"password_max_age"]);
 
 1487                        $security->setLoginMaxAttempts((
int) 
$_POST[
"login_max_attempts"]);
 
 1488                        $security->setPreventionOfSimultaneousLogins((
bool)
$_POST[
'ps_prevent_simultaneous_logins']);
 
 1489                        $security->setPasswordChangeOnFirstLoginEnabled((
bool) 
$_POST[
'password_change_on_first_login_enabled']);
 
 1490                        $security->setPasswordMustNotContainLoginnameStatus((
int) 
$_POST[
'password_must_not_contain_loginame']);
 
 1492                        if(!$security->validate($this->form))
 
 1501                                include_once 
'./Services/User/classes/class.ilUserAccountSettings.php';
 
 1506                                $ilSetting->set(
'allow_change_loginname', (
int)$this->form->getInput(
'allow_change_loginname'));
 
 1507                                $ilSetting->set(
'create_history_loginname', (
int)$this->form->getInput(
'create_history_loginname'));
 
 1508                                $ilSetting->set(
'reuse_of_loginnames', (
int)$this->form->getInput(
'reuse_of_loginnames'));
 
 1509                                $save_blocking_time_in_seconds = (int)($this->form->getInput(
'loginname_change_blocking_time') * 86400);
 
 1510                                $ilSetting->set(
'loginname_change_blocking_time', (
int)$save_blocking_time_in_seconds);
 
 1511                                $ilSetting->set(
'user_adm_alpha_nav', (
int)$this->form->getInput(
'user_adm_alpha_nav'));                        
 
 1512                                $ilSetting->set(
'user_reactivate_code', (
int)$this->form->getInput(
'user_reactivate_code'));
 
 1514                                $ilSetting->set(
'user_delete_own_account', (
int)$this->form->getInput(
'user_own_account'));
 
 1515                                $ilSetting->set(
'user_delete_own_account_email', $this->form->getInput(
'user_own_account_email'));
 
 1517                                $ilSetting->set(
"password_assistance", $this->form->getInput(
"password_assistance"));
 
 1521                                        (
int)$this->form->getInput(
'session_handling_type'));                   
 
 1526                                                $this->form->getInput(
'session_reminder_enabled'));     
 
 1530                                        require_once 
'Services/Authentication/classes/class.ilSessionControl.php';
 
 1532                                                $ilSetting->get(
'session_allow_client_maintenance',
 
 1537                                                include_once 
"Services/Authentication/classes/class.ilSessionStatistics.php";
 
 1541                                                        (
int)$this->form->getInput(
'session_max_count'));
 
 1543                                                        (
int)$this->form->getInput(
'session_min_idle'));
 
 1545                                                        (
int)$this->form->getInput(
'session_max_idle'));
 
 1546                                                $ilSetting->set(
'session_max_idle_after_first_request',
 
 1547                                                        (
int)$this->form->getInput(
'session_max_idle_after_first_request'));
 
 1563                $this->form->setValuesByPost();         
 
 1564                $this->tpl->setContent($this->form->getHTML());
 
 1577                $this->tabs_gui->setTabActive(
'settings');
 
 1578                $this->tabs_gui->setSubTabActive(
'general_settings');
 
 1580                include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
 1582                $this->form->setFormAction($this->ctrl->getFormAction($this, 
'saveGeneralSettings'));
 
 1584                $this->form->setTitle($this->lng->txt(
'general_settings'));
 
 1586                $lua = 
new ilCheckboxInputGUI($this->lng->txt(
'enable_local_user_administration'),
'lua');
 
 1587                $lua->setInfo($this->lng->txt(
'enable_local_user_administration_info'));
 
 1589                $this->form->addItem($lua);
 
 1592                $lrua->setInfo($this->lng->txt(
'restrict_user_access_info'));
 
 1594                $this->form->addItem($lrua);
 
 1597                $alph = 
new ilCheckboxInputGUI($this->lng->txt(
'user_adm_enable_alpha_nav'), 
'user_adm_alpha_nav');
 
 1600                $this->form->addItem($alph);
 
 1604                $code->setInfo($this->lng->txt(
'user_account_code_setting_info'));
 
 1605                $this->form->addItem(
$code);            
 
 1608                $own = 
new ilCheckboxInputGUI($this->lng->txt(
"user_allow_delete_own_account"), 
"user_own_account");
 
 1609                $this->form->addItem($own);             
 
 1610                $own_email = 
new ilEMailInputGUI($this->lng->txt(
"user_delete_own_account_notification_email"), 
"user_own_account_email");
 
 1611                $own->addSubItem($own_email);
 
 1623                $cb = 
new ilCheckboxInputGUI($this->lng->txt(
"session_reminder"), 
"session_reminder_enabled");
 
 1626                $cb->setInfo($this->lng->txt(
"session_reminder_info").
"<br />".
 
 1627                        sprintf($this->lng->txt(
'session_reminder_session_duration'), $time));          
 
 1628                $fixed->addSubItem($cb);
 
 1631                $ssettings->addOption($fixed);
 
 1637                require_once(
'Services/Authentication/classes/class.ilSessionControl.php');             
 
 1641                $sub_ti = 
new ilTextInputGUI($this->lng->txt(
'session_max_count'), 
'session_max_count');
 
 1642                $sub_ti->setMaxLength(5);
 
 1643                $sub_ti->setSize(5);
 
 1644                $sub_ti->setInfo($this->lng->txt(
'session_max_count_info'));            
 
 1646                        $sub_ti->setDisabled(
true);
 
 1647                $ldsh->addSubItem($sub_ti);
 
 1652                $sub_ti = 
new ilTextInputGUI($this->lng->txt(
'session_min_idle'), 
'session_min_idle');
 
 1653                $sub_ti->setMaxLength(5);
 
 1654                $sub_ti->setSize(5);
 
 1655                $sub_ti->setInfo($this->lng->txt(
'session_min_idle_info'));             
 
 1657                        $sub_ti->setDisabled(
true);
 
 1658                $ldsh->addSubItem($sub_ti);
 
 1663                $sub_ti = 
new ilTextInputGUI($this->lng->txt(
'session_max_idle'), 
'session_max_idle');
 
 1664                $sub_ti->setMaxLength(5);
 
 1665                $sub_ti->setSize(5);
 
 1666                $sub_ti->setInfo($this->lng->txt(
'session_max_idle_info'));             
 
 1668                        $sub_ti->setDisabled(
true);
 
 1669                $ldsh->addSubItem($sub_ti);
 
 1674                        $this->lng->txt(
'session_max_idle_after_first_request'),
 
 1675                        'session_max_idle_after_first_request' 
 1677                $sub_ti->setMaxLength(5);
 
 1678                $sub_ti->setSize(5);
 
 1679                $sub_ti->setInfo($this->lng->txt(
'session_max_idle_after_first_request_info')); 
 
 1681                        $sub_ti->setDisabled(
true);
 
 1682                $ldsh->addSubItem($sub_ti);
 
 1685                $ssettings->addOption($ldsh);
 
 1692                        $this->form->addItem($ssettings);
 
 1699                        $ti->setValue($this->lng->txt(
'session_config_maintenance_disabled'));
 
 1700                        $ssettings->setDisabled(
true);
 
 1701                        $ti->addSubItem($ssettings);
 
 1702                        $this->form->addItem($ti);
 
 1708                $this->lng->loadLanguageModule(
'ps');           
 
 1711                $pass->setTitle($this->lng->txt(
'ps_password_settings'));
 
 1712                $this->form->addItem(
$pass);
 
 1714                $check = 
new ilCheckboxInputGUI($this->lng->txt(
'ps_password_change_on_first_login_enabled'),
'password_change_on_first_login_enabled');
 
 1715                $check->setInfo($this->lng->txt(
'ps_password_change_on_first_login_enabled_info'));
 
 1716                $this->form->addItem($check);
 
 1718                include_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
 
 1720                $check = 
new ilCheckboxInputGUI($this->lng->txt(
'ps_password_must_not_contain_loginame'),
'password_must_not_contain_loginame');
 
 1721                $check->setInfo($this->lng->txt(
'ps_password_must_not_contain_loginame_info'));
 
 1722                $this->form->addItem($check);
 
 1724                $check = 
new ilCheckboxInputGUI($this->lng->txt(
'ps_password_chars_and_numbers_enabled'),
'password_chars_and_numbers_enabled');                 
 
 1726                $check->setInfo($this->lng->txt(
'ps_password_chars_and_numbers_enabled_info'));
 
 1727                $this->form->addItem($check);
 
 1729                $check = 
new ilCheckboxInputGUI($this->lng->txt(
'ps_password_special_chars_enabled'),
'password_special_chars_enabled');
 
 1731                $check->setInfo($this->lng->txt(
'ps_password_special_chars_enabled_info'));
 
 1732                $this->form->addItem($check);
 
 1735                $text->setInfo($this->lng->txt(
'ps_password_min_length_info'));
 
 1737                $text->setMaxLength(2);
 
 1738                $this->form->addItem(
$text);
 
 1741                $text->setInfo($this->lng->txt(
'ps_password_max_length_info'));
 
 1743                $text->setMaxLength(3);
 
 1744                $this->form->addItem(
$text);
 
 1746                $text = 
new ilNumberInputGUI($this->lng->txt(
'ps_password_uppercase_chars_num'), 
'password_ucase_chars_num');
 
 1747                $text->setInfo($this->lng->txt(
'ps_password_uppercase_chars_num_info'));
 
 1748                $text->setMinValue(0);
 
 1750                $text->setMaxLength(3);
 
 1751                $this->form->addItem(
$text);
 
 1753                $text = 
new ilNumberInputGUI($this->lng->txt(
'ps_password_lowercase_chars_num'), 
'password_lowercase_chars_num');
 
 1754                $text->setInfo($this->lng->txt(
'ps_password_lowercase_chars_num_info'));
 
 1755                $text->setMinValue(0);
 
 1757                $text->setMaxLength(3);
 
 1758                $this->form->addItem(
$text);
 
 1761                $text->setInfo($this->lng->txt(
'ps_password_max_age_info'));
 
 1763                $text->setMaxLength(3);
 
 1764                $this->form->addItem(
$text);
 
 1767                $cb = 
new ilCheckboxInputGUI($this->lng->txt(
"enable_password_assistance"), 
"password_assistance");             
 
 1768                $cb->setInfo($this->lng->txt(
"password_assistance_info"));
 
 1769                $this->form->addItem($cb);
 
 1772                $pass->setTitle($this->lng->txt(
'ps_security_protection'));
 
 1773                $this->form->addItem(
$pass);
 
 1776                $text->setInfo($this->lng->txt(
'ps_login_max_attempts_info'));
 
 1778                $text->setMaxLength(2);
 
 1779                $this->form->addItem(
$text);            
 
 1782                $objCb = 
new ilCheckboxInputGUI($this->lng->txt(
'ps_prevent_simultaneous_logins'), 
'ps_prevent_simultaneous_logins');           
 
 1783                $objCb->setValue(1);
 
 1784                $objCb->setInfo($this->lng->txt(
'ps_prevent_simultaneous_logins_info'));
 
 1785                $this->form->addItem($objCb);
 
 1791                $log->setTitle($this->lng->txt(
'loginname_settings'));
 
 1792                $this->form->addItem(
$log);
 
 1794                $chbChangeLogin = 
new ilCheckboxInputGUI($this->lng->txt(
'allow_change_loginname'), 
'allow_change_loginname');
 
 1795                $chbChangeLogin->setValue(1);
 
 1796                $this->form->addItem($chbChangeLogin);          
 
 1797                $chbCreateHistory = 
new ilCheckboxInputGUI($this->lng->txt(
'history_loginname'), 
'create_history_loginname');
 
 1798                $chbCreateHistory->setInfo($this->lng->txt(
'loginname_history_info'));
 
 1799                $chbCreateHistory->setValue(1);
 
 1801                $chbChangeLogin->addSubItem($chbCreateHistory); 
 
 1802                $chbReuseLoginnames = 
new ilCheckboxInputGUI($this->lng->txt(
'reuse_of_loginnames_contained_in_history'), 
'reuse_of_loginnames');
 
 1803                $chbReuseLoginnames->setValue(1);
 
 1804                $chbReuseLoginnames->setInfo($this->lng->txt(
'reuse_of_loginnames_contained_in_history_info'));
 
 1806                $chbChangeLogin->addSubItem($chbReuseLoginnames);
 
 1807                $chbChangeBlockingTime = 
new ilNumberInputGUI($this->lng->txt(
'loginname_change_blocking_time'), 
'loginname_change_blocking_time');
 
 1808                $chbChangeBlockingTime->allowDecimals(
true);
 
 1809                $chbChangeBlockingTime->setSuffix($this->lng->txt(
'days'));
 
 1810                $chbChangeBlockingTime->setInfo($this->lng->txt(
'loginname_change_blocking_time_info'));
 
 1811                $chbChangeBlockingTime->setSize(10);
 
 1812                $chbChangeBlockingTime->setMaxLength(10);
 
 1813                $chbChangeLogin->addSubItem($chbChangeBlockingTime);            
 
 1815                $this->form->addCommandButton(
'saveGeneralSettings', $this->lng->txt(
'save'));
 
 1835                include_once 
'Services/Search/classes/class.ilUserSearchOptions.php';
 
 1836                $lng->loadLanguageModule(
"administration");
 
 1837                $lng->loadLanguageModule(
"mail");
 
 1838                $lng->loadLanguageModule(
"chatroom");
 
 1840                $ilTabs->activateTab(
'settings');
 
 1841                $ilTabs->activateSubTab(
'standard_fields');
 
 1843                include_once(
"./Services/User/classes/class.ilUserFieldSettingsTableGUI.php");
 
 1845                if($this->confirm_change) 
$tab->setConfirmChange();
 
 1856                include_once 
'Services/Search/classes/class.ilUserSearchOptions.php';
 
 1857                include_once 
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php';
 
 1862                include_once(
"./Services/User/classes/class.ilUserProfile.php");
 
 1864                $up->skipField(
"username");
 
 1865                $field_properties = $up->getStandardFields();
 
 1866                $profile_fields = array_keys($field_properties);
 
 1869                foreach ($profile_fields as $field)
 
 1871                        if (    
$_POST[
"chb"][
"required_".$field] &&
 
 1872                                        !(
int)
$_POST[
'chb'][
'visib_reg_' . $field]
 
 1883                        $this->confirm_change = 1;
 
 1889                $fixed_required_fields = array(
 
 1896                        "hits_per_page" => 0,
 
 1898                        "hide_own_online_status" => 0
 
 1903                if ($privacy->enabledCourseExport() == 
true && 
 
 1904                        $privacy->courseConfirmationRequired() == 
true && 
 
 1907                        foreach ($profile_fields as $field)
 
 1909                                if (! 
$ilias->getSetting(
"usr_settings_course_export_" . $field) && 
$_POST[
"chb"][
"course_export_" . $field] == 
"1")
 
 1911                                        #ilUtil::sendQuestion($this->lng->txt('confirm_message_course_export')); 
 1912                                        #$this->confirm_change = 1; 
 1913                                        #$this->settingsObject(); 
 1919                if($action == 
'save')
 
 1921                        include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
 
 1925                foreach ($profile_fields as $field)
 
 1933                        if (!
$_POST[
"chb"][
"visible_".$field] && !$field_properties[$field][
"visible_hide"])
 
 1935                                $ilias->setSetting(
"usr_settings_hide_".$field, 
"1");
 
 1939                                $ilias->deleteSetting(
"usr_settings_hide_".$field);
 
 1942                        if (!
$_POST[
"chb"][
"changeable_" . $field] && !$field_properties[$field][
"changeable_hide"])
 
 1944                                $ilias->setSetting(
"usr_settings_disable_".$field, 
"1");
 
 1948                                $ilias->deleteSetting(
"usr_settings_disable_".$field);
 
 1952                        if ((
int)
$_POST[
'chb'][
'visib_reg_' . $field] && !$field_properties[$field][
"visib_reg_hide"])
 
 1954                                $ilSetting->set(
'usr_settings_visib_reg_'.$field, 
'1');
 
 1958                                $ilSetting->set(
'usr_settings_visib_reg_'.$field, 
'0');
 
 1961                        if ((
int)
$_POST[
'chb'][
'visib_lua_' . $field])
 
 1964                                $ilSetting->set(
'usr_settings_visib_lua_'.$field, 
'1');
 
 1968                                $ilSetting->set(
'usr_settings_visib_lua_'.$field, 
'0');
 
 1971                        if ((
int)
$_POST[
'chb'][
'changeable_lua_' . $field])
 
 1974                                $ilSetting->set(
'usr_settings_changeable_lua_'.$field, 
'1');
 
 1978                                $ilSetting->set(
'usr_settings_changeable_lua_'.$field, 
'0');
 
 1981                        if (
$_POST[
"chb"][
"export_" . $field] && !$field_properties[$field][
"export_hide"])
 
 1983                                $ilias->setSetting(
"usr_settings_export_".$field, 
"1");
 
 1987                                $ilias->deleteSetting(
"usr_settings_export_".$field);
 
 1991                        if (
$_POST[
"chb"][
"course_export_" . $field] && !$field_properties[$field][
"course_export_hide"])
 
 1993                                $ilias->setSetting(
"usr_settings_course_export_".$field, 
"1");
 
 1997                                $ilias->deleteSetting(
"usr_settings_course_export_".$field);
 
 2001                        if (
$_POST[
"chb"][
"group_export_" . $field] && !$field_properties[$field][
"group_export_hide"])
 
 2003                                $ilias->setSetting(
"usr_settings_group_export_".$field, 
"1");
 
 2007                                $ilias->deleteSetting(
"usr_settings_group_export_".$field);
 
 2010                        $is_fixed = array_key_exists($field, $fixed_required_fields);
 
 2011                        if ($is_fixed && $fixed_required_fields[$field] || ! $is_fixed && 
$_POST[
"chb"][
"required_".$field])
 
 2013                                $ilias->setSetting(
"require_".$field, 
"1");
 
 2017                                $ilias->deleteSetting(
"require_" . $field);
 
 2021                if (
$_POST[
"select"][
"default_hits_per_page"])
 
 2023                        $ilias->setSetting(
"hits_per_page",
$_POST[
"select"][
"default_hits_per_page"]);
 
 2031                if (
$_POST[
"chb"][
"export_preferences"])
 
 2033                        $ilias->setSetting(
"usr_settings_export_preferences",
$_POST[
"chb"][
"export_preferences"]);
 
 2035                        $ilias->deleteSetting(
"usr_settings_export_preferences");
 
 2038                $ilias->setSetting(
'mail_incoming_mail', (
int)
$_POST[
'select'][
'default_mail_incoming_mail']);
 
 2052                $action[-1] = $this->lng->txt(
'all_users');
 
 2053                $action[1] = $this->lng->txt(
'usr_active_only');
 
 2054                $action[0] = $this->lng->txt(
'usr_inactive_only');
 
 2055                $action[2] = $this->lng->txt(
'usr_limited_access_only');
 
 2056                $action[3] = $this->lng->txt(
'usr_without_courses');
 
 2057                $action[4] = $this->lng->txt(
'usr_filter_lastlogin');
 
 2058                $action[5] = $this->lng->txt(
"usr_filter_coursemember");
 
 2059                $action[6] = $this->lng->txt(
"usr_filter_groupmember");
 
 2060                $action[7] = $this->lng->txt(
"usr_filter_role");
 
 2073                if(!isset(
$_POST[
"file"]))
 
 2075                        $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
 
 2078                if (count(
$_POST[
"file"]) > 1)
 
 2080                        $this->
ilias->raiseError($this->lng->txt(
"select_max_one_item"),$this->ilias->error_obj->MESSAGE);
 
 2085                $export_dir = $this->
object->getExportDirectory();
 
 2094                if(!isset(
$_POST[
"file"]))
 
 2096                        $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
 
 2100                include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
 2102                $cgui->setFormAction($this->ctrl->getFormAction($this));
 
 2103                $cgui->setHeaderText($this->lng->txt(
"info_delete_sure"));
 
 2104                $cgui->setCancel($this->lng->txt(
"cancel"), 
"cancelDeleteExportFile");
 
 2105                $cgui->setConfirm($this->lng->txt(
"confirm"), 
"deleteExportFile");              
 
 2113                $this->tpl->setContent($cgui->getHTML());
 
 2122                $this->ctrl->redirectByClass(
"ilobjuserfoldergui", 
"export");
 
 2131                $export_dir = $this->
object->getExportDirectory();
 
 2136                        $exp_file = $export_dir.
"/".
$file;
 
 2137                        if (@is_file($exp_file))
 
 2142                $this->ctrl->redirectByClass(
"ilobjuserfoldergui", 
"export");
 
 2159                if (
$_POST[
"cmd"][
"export"])
 
 2161                        $this->
object->buildExportFile(
$_POST[
"export_type"]);
 
 2162                        $this->ctrl->redirectByClass(
"ilobjuserfoldergui", 
"export");
 
 2166                $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.usr_export.html',
'Services/User');
 
 2168                $export_types = array(
 
 2169                        "userfolder_export_excel_x86",
 
 2170                        "userfolder_export_csv",
 
 2171                        "userfolder_export_xml" 
 2175                include_once(
"./Services/Table/classes/class.ilTableGUI.php");
 
 2179                $this->tpl->addBlockfile(
"EXPORT_FILES", 
"export_files", 
"tpl.table.html");
 
 2182                $this->tpl->addBlockfile(
"TBL_CONTENT", 
"tbl_content", 
"tpl.usr_export_file_row.html", 
"Services/User");
 
 2186                $tbl->setTitle($this->lng->txt(
"userfolder_export_files"));
 
 2188                $tbl->setHeaderNames(array(
"", $this->lng->txt(
"userfolder_export_file"),
 
 2189                        $this->lng->txt(
"userfolder_export_file_size"), $this->lng->txt(
"date") ));
 
 2190                $tbl->setHeaderVars(array(), 
$ilCtrl->getParameterArray($this, 
"export"));
 
 2192                $tbl->enabled[
"sort"] = 
false;
 
 2193                $tbl->setColumnWidth(array(
"1%", 
"49%", 
"25%", 
"25%"));
 
 2197                $tbl->setOrderDirection(
$_GET[
"sort_order"]);
 
 2200                $tbl->setMaxCount($this->maxcount);             
 
 2203                $this->tpl->setVariable(
"COLUMN_COUNTS", 4);
 
 2207                $this->tpl->setVariable(
"ALT_ARROW", $this->lng->txt(
"actions"));
 
 2208                $this->tpl->setCurrentBlock(
"tbl_action_btn");
 
 2209                $this->tpl->setVariable(
"BTN_NAME", 
"confirmDeleteExportFile");
 
 2210                $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"delete"));
 
 2211                $this->tpl->parseCurrentBlock();
 
 2213                $this->tpl->setCurrentBlock(
"tbl_action_btn");
 
 2214                $this->tpl->setVariable(
"BTN_NAME", 
"downloadExportFile");
 
 2215                $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"download"));
 
 2216                $this->tpl->parseCurrentBlock();
 
 2219                $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
 
 2222                $export_files = $this->
object->getExportFiles();
 
 2224                $tbl->setMaxCount(count($export_files));
 
 2225                $export_files = array_slice($export_files, 
$_GET[
"offset"], 
$_GET[
"limit"]);
 
 2229                if(count($export_files) > 0)
 
 2232                        foreach($export_files as $exp_file)
 
 2234                                $this->tpl->setCurrentBlock(
"tbl_content");
 
 2235                                $this->tpl->setVariable(
"TXT_FILENAME", $exp_file[
"filename"]);
 
 2238                                $this->tpl->setVariable(
"CSS_ROW", $css_row);
 
 2240                                $this->tpl->setVariable(
"TXT_SIZE", $exp_file[
"filesize"]);
 
 2241                                $this->tpl->setVariable(
"CHECKBOX_ID", $exp_file[
"filename"]);
 
 2243                                $file_arr = explode(
"__", $exp_file[
"filename"]);
 
 2246                                $this->tpl->parseCurrentBlock();
 
 2249                        $this->tpl->setCurrentBlock(
"selectall");
 
 2250                        $this->tpl->setVariable(
"SELECT_ALL", $this->lng->txt(
"select_all"));
 
 2251                        $this->tpl->setVariable(
"CSS_ROW", $css_row);
 
 2252                        $this->tpl->parseCurrentBlock();
 
 2265                $this->tpl->parseCurrentBlock();
 
 2268                foreach ($export_types as $export_type)
 
 2270                        $this->tpl->setCurrentBlock(
"option");
 
 2271                        $this->tpl->setVariable(
"OPTION_VALUE", $export_type);
 
 2272                        $this->tpl->setVariable(
"OPTION_TEXT", $this->lng->txt($export_type));
 
 2273                        $this->tpl->parseCurrentBlock();
 
 2276                $this->tpl->setVariable(
"EXPORT_BUTTON", $this->lng->txt(
"create_export_file"));
 
 2277                $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
 
 2284                $lng->loadLanguageModule(
"meta");
 
 2285                $lng->loadLanguageModule(
"mail");
 
 2287                include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
 2289                $form->setFormAction(
$ilCtrl->getFormAction($this));
 
 2292                $form->setTitle(
$lng->txt(
"user_new_account_mail"));
 
 2293                $form->setDescription(
$lng->txt(
"user_new_account_mail_desc"));
 
 2295                $langs = 
$lng->getInstalledLanguages();
 
 2296                foreach($langs as $lang_key)
 
 2298                        $amail = $this->
object->_lookupNewAccountMail($lang_key);
 
 2301                        if ($lang_key == 
$lng->getDefaultLanguage())
 
 2303                                $title .= 
" (".$lng->txt(
"default").
")";
 
 2312                        $subj->setValue($amail[
"subject"]);
 
 2313                        $form->addItem($subj);
 
 2315                        $salg = 
new ilTextInputGUI(
$lng->txt(
"mail_salutation_general"), 
"sal_g_".$lang_key);
 
 2317                        $salg->setValue($amail[
"sal_g"]);
 
 2318                        $form->addItem($salg);
 
 2322                        $salf->setValue($amail[
"sal_f"]);
 
 2323                        $form->addItem($salf);
 
 2327                        $salm->setValue($amail[
"sal_m"]);
 
 2328                        $form->addItem($salm);
 
 2332                        $body->setValue($amail[
"body"]);
 
 2334                        $body->setCols(100);
 
 2335                        $form->addItem($body);
 
 2338                        $att->setAllowDeletion(
true);
 
 2339                        if($amail[
"att_file"])
 
 2341                                $att->setValue($amail[
"att_file"]);
 
 2343                        $form->addItem($att);
 
 2346                $form->addCommandButton(
"saveNewAccountMail", 
$lng->txt(
"save"));
 
 2347                $form->addCommandButton(
"cancelNewAccountMail", 
$lng->txt(
"cancel"));
 
 2360                $this->tabs_gui->setTabActive(
'settings');
 
 2361                $this->tabs_gui->setSubTabActive(
'user_new_account_mail');
 
 2365                $ftpl = 
new ilTemplate(
'tpl.usrf_new_account_mail.html', 
true, 
true, 
'Services/User');
 
 2366                $ftpl->setVariable(
"FORM", $form->getHTML());
 
 2370                $ftpl->setVariable(
"TXT_USE_PLACEHOLDERS", 
$lng->txt(
"mail_nacc_use_placeholder"));
 
 2371                $ftpl->setVariable(
"TXT_MAIL_SALUTATION", 
$lng->txt(
"mail_nacc_salutation"));
 
 2372                $ftpl->setVariable(
"TXT_FIRST_NAME", 
$lng->txt(
"firstname"));
 
 2373                $ftpl->setVariable(
"TXT_LAST_NAME", 
$lng->txt(
"lastname"));
 
 2374                $ftpl->setVariable(
"TXT_EMAIL", 
$lng->txt(
"email"));
 
 2375                $ftpl->setVariable(
"TXT_LOGIN", 
$lng->txt(
"mail_nacc_login"));
 
 2376                $ftpl->setVariable(
"TXT_PASSWORD", 
$lng->txt(
"password"));
 
 2377                $ftpl->setVariable(
"TXT_PASSWORD_BLOCK", 
$lng->txt(
"mail_nacc_pw_block"));
 
 2378                $ftpl->setVariable(
"TXT_NOPASSWORD_BLOCK", 
$lng->txt(
"mail_nacc_no_pw_block"));
 
 2379                $ftpl->setVariable(
"TXT_ADMIN_MAIL", 
$lng->txt(
"mail_nacc_admin_mail"));
 
 2380                $ftpl->setVariable(
"TXT_ILIAS_URL", 
$lng->txt(
"mail_nacc_ilias_url"));
 
 2381                $ftpl->setVariable(
"TXT_CLIENT_NAME", 
$lng->txt(
"mail_nacc_client_name"));
 
 2382                $ftpl->setVariable(
"TXT_TARGET", 
$lng->txt(
"mail_nacc_target"));
 
 2383                $ftpl->setVariable(
"TXT_TARGET_TITLE", 
$lng->txt(
"mail_nacc_target_title"));
 
 2384                $ftpl->setVariable(
"TXT_TARGET_TYPE", 
$lng->txt(
"mail_nacc_target_type"));
 
 2385                $ftpl->setVariable(
"TXT_TARGET_BLOCK", 
$lng->txt(
"mail_nacc_target_block"));    
 
 2386                $ftpl->setVariable(
"TXT_IF_TIMELIMIT", 
$lng->txt(
"mail_nacc_if_timelimit"));    
 
 2387                $ftpl->setVariable(
"TXT_TIMELIMIT", 
$lng->txt(
"mail_nacc_timelimit"));  
 
 2389                $this->tpl->setContent($ftpl->get());
 
 2394                $this->ctrl->redirect($this, 
"settings");
 
 2401                $langs = 
$lng->getInstalledLanguages();
 
 2402                foreach($langs as $lang_key)
 
 2404                        $this->
object->_writeNewAccountMail($lang_key,
 
 2411                        if($_FILES[
"att_".$lang_key][
"tmp_name"])
 
 2413                                $this->
object->_updateAccountMailAttachment($lang_key, 
 
 2414                                        $_FILES[
"att_".$lang_key][
"tmp_name"],
 
 2415                                        $_FILES[
"att_".$lang_key][
"name"]);                             
 
 2418                        if (
$_POST[
"att_".$lang_key.
"_delete"])
 
 2420                                $this->
object->_deleteAccountMailAttachment($lang_key);
 
 2425                $this->ctrl->redirect($this, 
"newAccountMail");
 
 2440                include_once 
'Services/Tracking/classes/class.ilObjUserTracking.php';
 
 2444                if ($rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
 
 2446                        $this->tabs_gui->addTarget(
"usrf",
 
 2447                                $this->ctrl->getLinkTarget($this, 
"view"), array(
"view",
"delete",
"resetFilter", 
"userAction", 
""), 
"", 
"");
 
 2449                        $this->tabs_gui->addTarget(
 
 2450                                "search_user_extended",
 
 2451                                $this->ctrl->getLinkTargetByClass(
'ilRepositorySearchGUI',
''),
 
 2453                                "ilrepositorysearchgui",
 
 2458                if ($rbacsystem->checkAccess(
"write",$this->object->getRefId()))
 
 2460                        $this->tabs_gui->addTarget(
"settings",
 
 2461                                $this->ctrl->getLinkTarget($this, 
"generalSettings"),array(
'settings',
'generalSettings',
'listUserDefinedField',
'newAccountMail'));
 
 2463                        $this->tabs_gui->addTarget(
"export",
 
 2464                                $this->ctrl->getLinkTarget($this, 
"export"), 
"export", 
"", 
"");
 
 2476                if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
 
 2478                        $this->tabs_gui->addTarget(
"perm_settings",
 
 2479                                                                 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'), 
"perm"), 
 
 2480                                                                 array(
"perm",
"info",
"owner"), 
'ilpermissiongui');
 
 2495                                $this->tabs_gui->addSubTabTarget(
 
 2497                                        $this->ctrl->getLinkTarget($this, 
'generalSettings'), 
'generalSettings', get_class($this));                                                                                              
 
 2498                                $this->tabs_gui->addSubTabTarget(
"standard_fields",
 
 2499                                                                                                 $this->ctrl->getLinkTarget($this,
'settings'),
 
 2500                                                                                                 array(
"settings", 
"saveGlobalUserSettings"), get_class($this));
 
 2501                                $this->tabs_gui->addSubTabTarget(
"user_defined_fields",
 
 2502                                                                                                 $this->ctrl->getLinkTargetByClass(
"ilcustomuserfieldsgui", 
"listUserDefinedFields"),
 
 2503                                                                                                 "listUserDefinedFields",get_class($this));
 
 2504                                $this->tabs_gui->addSubTabTarget(
"user_new_account_mail",
 
 2505                                                                                                 $this->ctrl->getLinkTarget($this,
'newAccountMail'),
 
 2506                                                                                                 "newAccountMail",get_class($this));                            
 
 2507                                #$this->tabs_gui->addSubTab("account_codes", $this->lng->txt("user_account_codes"),
 
 2508                                #                                                        $this->ctrl->getLinkTargetByClass("ilaccountcodesgui"));                                                                                                
 
 2517                $show_blocking_time_in_days = (int)
$ilSetting->get(
'loginname_change_blocking_time') / 86400;
 
 2520                $this->loginSettingsForm->setValuesByArray(array(
 
 2521                        'allow_change_loginname' => (
bool)
$ilSetting->get(
'allow_change_loginname'),
 
 2522                        'create_history_loginname' => (
bool)
$ilSetting->get(
'create_history_loginname'),
 
 2523                        'reuse_of_loginnames' => (
bool)
$ilSetting->get(
'reuse_of_loginnames'),
 
 2524                        'loginname_change_blocking_time' => (
float)$show_blocking_time_in_days
 
 2527                $this->tpl->setVariable(
'ADM_CONTENT', $this->loginSettingsForm->getHTML());
 
 2533                $this->tabs_gui->setTabActive(
'settings');
 
 2534                $this->tabs_gui->setSubTabActive(
'loginname_settings');
 
 2536                include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
 2538                $this->loginSettingsForm->
setFormAction($this->ctrl->getFormAction($this, 
'saveLoginnameSettings'));
 
 2539                $this->loginSettingsForm->setTitle($this->lng->txt(
'loginname_settings'));
 
 2541                $chbChangeLogin = 
new ilCheckboxInputGUI($this->lng->txt(
'allow_change_loginname'), 
'allow_change_loginname');
 
 2542                $chbChangeLogin->setValue(1);
 
 2543                $this->loginSettingsForm->addItem($chbChangeLogin);             
 
 2544                        $chbCreateHistory = 
new ilCheckboxInputGUI($this->lng->txt(
'history_loginname'), 
'create_history_loginname');
 
 2545                        $chbCreateHistory->setInfo($this->lng->txt(
'loginname_history_info'));
 
 2546                        $chbCreateHistory->setValue(1);
 
 2547                $chbChangeLogin->addSubItem($chbCreateHistory); 
 
 2548                        $chbReuseLoginnames = 
new ilCheckboxInputGUI($this->lng->txt(
'reuse_of_loginnames_contained_in_history'), 
'reuse_of_loginnames');
 
 2549                        $chbReuseLoginnames->setValue(1);
 
 2550                        $chbReuseLoginnames->setInfo($this->lng->txt(
'reuse_of_loginnames_contained_in_history_info'));
 
 2551                $chbChangeLogin->addSubItem($chbReuseLoginnames);
 
 2552                        $chbChangeBlockingTime = 
new ilNumberInputGUI($this->lng->txt(
'loginname_change_blocking_time'), 
'loginname_change_blocking_time');
 
 2553                        $chbChangeBlockingTime->allowDecimals(
true);
 
 2554                        $chbChangeBlockingTime->setSuffix($this->lng->txt(
'days'));
 
 2555                        $chbChangeBlockingTime->setInfo($this->lng->txt(
'loginname_change_blocking_time_info'));
 
 2556                        $chbChangeBlockingTime->setSize(10);
 
 2557                        $chbChangeBlockingTime->setMaxLength(10);
 
 2558                $chbChangeLogin->addSubItem($chbChangeBlockingTime);            
 
 2560                $this->loginSettingsForm->addCommandButton(
'saveLoginnameSettings', $this->lng->txt(
'save'));
 
 2568                if($this->loginSettingsForm->checkInput())
 
 2572                        if(!strlen($this->loginSettingsForm->getInput(
'loginname_change_blocking_time')))
 
 2575                                $this->loginSettingsForm->getItemByPostVar(
'loginname_change_blocking_time')
 
 2576                                                                                ->setAlert($this->lng->txt(
'loginname_change_blocking_time_invalidity_info'));
 
 2581                                $save_blocking_time_in_seconds = (int)$this->loginSettingsForm->getInput(
'loginname_change_blocking_time') * 86400;
 
 2583                                $ilSetting->set(
'allow_change_loginname', (
int)$this->loginSettingsForm->getInput(
'allow_change_loginname'));
 
 2584                                $ilSetting->set(
'create_history_loginname', (
int)$this->loginSettingsForm->getInput(
'create_history_loginname'));
 
 2585                                $ilSetting->set(
'reuse_of_loginnames', (
int)$this->loginSettingsForm->getInput(
'reuse_of_loginnames'));
 
 2586                                $ilSetting->set(
'loginname_change_blocking_time', (
int)$save_blocking_time_in_seconds);
 
 2599                $this->loginSettingsForm->setValuesByPost();            
 
 2601                $this->tpl->setVariable(
'ADM_CONTENT', $this->loginSettingsForm->getHTML());
 
 2613                if ($ilAccess->checkAccess(
"read", 
"", $a_target))
 
 2615                        ilUtil::redirect(
"ilias.php?baseClass=ilAdministrationGUI&ref_id=".$a_target.
"&jmpToUser=".$a_user);
 
 2620                        if ($ilAccess->checkAccess(
"read", 
"", ROOT_FOLDER_ID))
 
 2639                        $ilCtrl->setParameterByClass(
"ilobjusergui", 
"obj_id", (
int) 
$_GET[
"jmpToUser"]);
 
 2640                        $ilCtrl->redirectByClass(
"ilobjusergui", 
"view");
 
 2649                if(!count((array) $a_usr_ids))
 
 2655                $_POST[
'id'] = $a_usr_ids;
 
 2658                if(stristr($a_cmd, 
"export"))
 
 2660                        $cmd = $a_cmd.
"Object";
 
 2661                        return $this->
$cmd();
 
 2664                $_POST[
'selectedAction'] = $a_cmd;              
 
 2676                                'activate' => $this->lng->txt(
'activate'),
 
 2677                                'deactivate' => $this->lng->txt(
'deactivate'),
 
 2678                                'accessRestrict' => $this->lng->txt(
'accessRestrict'),
 
 2679                                'accessFree' => $this->lng->txt(
'accessFree')
 
 2682                        if ($rbacsystem->checkAccess(
'delete', $this->object->getRefId()))
 
 2684                                $cmds[
"delete"] = $this->lng->txt(
"delete");
 
 2691                                'activateUsers' => $this->lng->txt(
'activate'),
 
 2692                                'deactivateUsers' => $this->lng->txt(
'deactivate'),
 
 2693                                'restrictAccess' => $this->lng->txt(
'accessRestrict'),
 
 2694                                'freeAccess' => $this->lng->txt(
'accessFree')
 
 2697                        if ($rbacsystem->checkAccess(
'delete', $this->object->getRefId()))
 
 2699                                $cmds[
"deleteUsers"] = $this->lng->txt(
"delete");                               
 
 2704                $export_types = array(
"userfolder_export_excel_x86", 
"userfolder_export_csv", 
"userfolder_export_xml");         
 
 2705                foreach ($export_types as $type)
 
 2707                        $cmd = explode(
"_", $type);
 
 2709                        $cmds[
'usrExport'.ucfirst(
$cmd)] = $this->lng->txt(
'export').
' - '.
 
 2710                                $this->lng->txt($type);
 
 2714                include_once 
"Services/Mail/classes/class.ilMail.php";
 
 2716                if($rbacsystem->checkAccess(
'internal_mail', $mail->getMailObjectReferenceId()))
 
 2718                        $cmds[
"mail"] = $this->lng->txt(
"send_mail");
 
 2721                $cmds[
'addToClipboard'] = $this->lng->txt(
'clipboard_add_btn');
 
 2734                $this->
object->buildExportFile(
"userfolder_export_excel_x86", $user_ids);               
 
 2735                $this->ctrl->redirectByClass(
"ilobjuserfoldergui", 
"export");
 
 2746                $this->
object->buildExportFile(
"userfolder_export_csv", $user_ids);             
 
 2747                $this->ctrl->redirectByClass(
"ilobjuserfoldergui", 
"export");
 
 2758                $this->
object->buildExportFile(
"userfolder_export_xml", $user_ids);             
 
 2759                $this->ctrl->redirectByClass(
"ilobjuserfoldergui", 
"export");
 
 2774                include_once 
"Services/Contact/classes/class.ilMailingLists.php";
 
 2776                $list->deleteTemporaryLists();
 
 2779                include_once 
"Services/Contact/classes/class.ilMailingList.php";
 
 2782                $list->setTitle(
"-TEMPORARY SYSTEM LIST-");
 
 2783                $list->setDescription(
"-USER ACCOUNTS MAIL-");
 
 2784                $list->setCreateDate(
date(
"Y-m-d H:i:s"));              
 
 2786                $list_id = $list->getId();                              
 
 2789                foreach($user_ids as $user_id)
 
 2791                        $list->assignUser($user_id);
 
 2794                include_once 
"Services/Mail/classes/class.ilFormatMail.php";
 
 2796                $mail_data = $umail->getSavedData();            
 
 2798                if(!is_array($mail_data))
 
 2800                        $mail_data = array(
"user_id" => 
$ilUser->getId());
 
 2806                $umail->savePostData(
 
 2807                        $mail_data[
'user_id'],
 
 2808                        $mail_data[
'attachments'],
 
 2810                        $mail_data[
'rcp_cc'],
 
 2811                        $mail_data[
'rcp_bcc'],
 
 2812                        $mail_data[
'm_type'],
 
 2813                        $mail_data[
'm_email'],
 
 2814                        $mail_data[
'm_subject'],
 
 2815                        $mail_data[
'm_message'],
 
 2816                        $mail_data[
'use_placeholders'],
 
 2817                        $mail_data[
'tpl_ctx_id'],
 
 2818                        $mail_data[
'tpl_ctx_params']
 
 2821                require_once 
'Services/Mail/classes/class.ilMailFormCall.php';
 
 2828                                        'type' => 
'search_res' 
 2840                                include_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
 
 2850                                        'ps_password_min_length' => (
int)$security->getPasswordMinLength(),
 
 2851                                        'ps_password_max_length' => (
int)$security->getPasswordMaxLength(),
 
 2852                                        'ps_password_uppercase_chars_num' => (
int)$security->getPasswordNumberOfUppercaseChars(),
 
 2853                                        'ps_password_lowercase_chars_num' => (
int)$security->getPasswordNumberOfLowercaseChars(),
 
 2854                                        'ps_password_max_age' => (
int)$security->getPasswordMaxAge()
 
 2856                                $fields[
'ps_password_settings'] = array(
null, 
null, $subitems);
 
 2859                                        'ps_login_max_attempts' => (
int)$security->getLoginMaxAttempts(),
 
 2862                                $fields[
'ps_security_protection'] = array(
null, 
null, $subitems);
 
 2864                                return array(array(
"generalSettings", $fields));        
 
 2870                $users = (array) 
$_POST[
'id'];
 
 2874                        $this->ctrl->redirect($this, 
'view');
 
 2876                include_once 
'./Services/User/classes/class.ilUserClipboard.php';
 
 2882                $this->ctrl->redirect($this, 
'view');
 
sprintf('%.4f', $callTime)
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
for($col=0; $col< 50; $col++) $d
An exception for terminatinating execution or to throw for unit testing.
const USER_FOLDER_ID
Class ilObjUserFolder.
const IL_UPDATE_ON_CONFLICT
const IL_IGNORE_ON_CONFLICT
GUI class for account codes.
Confirmation screen class.
Class ilCustomUserFieldsGUI.
static secondsToString($seconds, $force_with_seconds=false, $a_lng=null)
converts seconds to string: Long: 7 days 4 hour(s) ...
static formatDate(ilDateTime $date)
Format a date @access public.
@classDescription Date and time handling
This class handles base functions for mail handling.
static _reset()
Reset all.
This class represents a non editable value in a property form.
static _getAssignUsersStatus($a_role_id)
Class ilObjUserFolderGUI.
addUserObject()
Add new user;.
deactivateUsersObject()
Deactivate users.
importCancelledObject()
import cancelled
resetFilterObject()
Reset filter (note: this function existed before data table filter has been introduced.
saveGeneralSettingsObject()
Save user account settings.
addUserAutoCompleteObject()
Show auto complete results.
confirmdeactivateObject()
Set the selected users inactive.
cancelNewAccountMailObject()
cancelSearchActionObject()
deleteUsersObject()
Delete users.
restrictAccessObject()
Restrict access.
newAccountMailObject()
new account mail administration
showPossibleSubObjects()
show possible subobjects (pulldown menu) overwritten to prevent displaying of role templates in local...
initUserImportForm()
Init user import form.
activateUsersObject()
Activate users.
__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
Constructor @access public.
confirmdeleteObject()
confirm delete Object
initFormGeneralSettings()
init general settings form
getUserMultiCommands($a_search_form=false)
getAdminTabs()
administration tabs show only permissions and trash folder
setAccessRestrictionObject($a_form=null, $a_from_search=false)
viewObject($reset_filter=FALSE)
list users
importUserFormObject()
display form for user import
confirmaccessFreeObject()
importUserRoleAssignmentObject()
display form for user import
exportObject()
Global user settings.
jumpToUserObject()
Jump to edit screen for user.
__buildUserFilterSelect()
build select form to distinguish between active and non-active users
importUsersObject()
import users
showLoginnameSettingsObject()
initAccessRestrictionForm($a_from_search=false)
applyFilterObject()
Apply filter.
getActionUserIds()
Get selected items for table action.
cancelDeleteExportFileObject()
cancel deletion of export files
searchResultHandler($a_usr_ids, $a_cmd)
Handles multi command from repository search gui.
downloadExportFileObject()
Download selected export files.
confirmDeleteExportFileObject()
confirmation screen for export file deletion
saveNewAccountMailObject()
settingsObject()
Global user settings.
saveGlobalUserSettingsObject($action="")
cancelUserFolderActionObject()
static _goto($a_user)
goto target group
getImportDir()
get user import directory name
getTabs()
get tabs @access public
saveLoginnameSettingsObject()
showActionConfirmation($action, $a_from_search=false)
display activation confirmation screen
showActions($with_subobjects=false)
show possible action (form buttons)
setSubTabs($a_tab)
set sub tabs
executeCommand()
execute command
deleteExportFileObject()
delete export files
generalSettingsObject()
Show user account general settings.
confirmaccessRestrictObject()
confirmactivateObject()
Set the selected users active.
chooseLetterObject()
Choose first letter.
freeAccessObject()
Free access.
addToExternalSettingsForm($a_form_id)
static _lookupNewAccountMail($a_lang)
static _enabledLearningProgress()
check wether learing progress is enabled or not
static _enabledUserRelatedData()
check wether user related tracking is enabled or not
static getFirstLettersOfLastnames()
Get first letters of all lastnames.
Class ilObjectGUI Basic methods of all Output classes.
prepareOutput($a_show_subobjects=true)
prepare output
viewObject()
list childs of current object
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
static _lookupType($a_id, $a_reference=false)
lookup object type
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static _getInstance()
Get instance of ilPrivacySettings.
This class represents an option in a radio group.
static _getInstance()
Get instance of ilSecuritySettings.
const DEFAULT_MAX_IDLE_AFTER_FIRST_REQUEST
const DEFAULT_ALLOW_CLIENT_MAINTENANCE
const DEFAULT_MAX_COUNT
default value for settings that have not been defined in setup or administration yet
static updateLimitLog($a_new_value)
Log max session setting.
const SESSION_HANDLING_LOAD_DEPENDENT
const SESSION_HANDLING_FIXED
static getSessionExpireValue()
Returns the session expiration value.
special template class to simplify handling of ITX/PEAR
This class represents a text area property in a property form.
This class represents a text property in a property form.
static getInstance()
Singelton get instance.
Auto completion class for user lists.
static getInstance($a_usr_id)
Get singelton instance.
Learning progress account list for user administration.
static _isSearchable($a_key)
static _saveStatus($a_key, $a_enabled)
TableGUI class for user administration.
static getDataDir()
get data directory (outside webspace)
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static redirect($a_script)
http redirect to other script
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static switchColor($a_num, $a_css1, $a_css2)
switches style sheets for each even $a_num (used for changing colors of different result rows)
static getDir($a_dir, $a_rec=false, $a_sub_dir="")
get directory
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static makeDirParents($a_dir)
Create a new directory and all parent directories.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static formSelect($selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
redirection script todo: (a better solution should control the processing via a xml file)
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file