X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fpersonal%2Fposix%2Fclass_posixAccount.inc;h=8cd19aed072934367726dc774c85f8c1f05f4078;hb=77198960802cc2a7095c62e8dcd87bc0fea69766;hp=db27b72e4f8a2cd48ba09c74e57423348fc6d9a7;hpb=6ece749f6949dc30052566d2abab5246df092ff9;p=gosa.git diff --git a/plugins/personal/posix/class_posixAccount.inc b/plugins/personal/posix/class_posixAccount.inc index db27b72e4..8cd19aed0 100644 --- a/plugins/personal/posix/class_posixAccount.inc +++ b/plugins/personal/posix/class_posixAccount.inc @@ -29,7 +29,6 @@ class posixAccount extends plugin var $shadowInactive= "0"; var $shadowExpire= "0"; var $gosaDefaultPrinter= ""; - var $gosaDefaultLanguage= ""; var $accessTo= array(); var $trustModel= ""; @@ -59,12 +58,13 @@ class posixAccount extends plugin var $GroupRegex = "*"; var $GroupUserRegex = "*"; var $SubSearch = false; + var $memberGroup = array(); /* attribute list for save action */ var $CopyPasteVars = array("grouplist","groupMembership","use_shadowMin","use_shadowMax","use_shadowWarning","use_shadowInactive","use_shadowExpire","must_change_password","grouplist","savedGidNumber","savedUidNumber"); var $attributes = array("homeDirectory", "loginShell", "uidNumber", "gidNumber", "gecos", "shadowMin", "shadowMax", "shadowWarning", "shadowInactive", "shadowLastChange", - "shadowExpire", "gosaDefaultPrinter", "gosaDefaultLanguage", "uid","accessTo","trustModel"); + "shadowExpire", "gosaDefaultPrinter", "uid","accessTo","trustModel"); var $objectclasses= array("posixAccount", "shadowAccount"); var $uid =""; @@ -497,7 +497,6 @@ class posixAccount extends plugin } else { $smarty->assign("groups", ""); } - $smarty->assign("languages", $this->config->data['MAIN']['LANGUAGES']); /* Avoid "Undefined index: forceMode" */ $smarty->assign("forceMode", ""); @@ -646,6 +645,9 @@ class posixAccount extends plugin $this->is_modified= TRUE; } $this->primaryGroup= $_POST['primaryGroup']; + if ($this->primaryGroup != 0){ + $this->gidNumber= $this->primaryGroup; + } } /* Save pwmode dependent attributes, curently hardcoded because there're @@ -870,7 +872,6 @@ class posixAccount extends plugin if (!isset($this->savedGroupMembership[$key])){ $g= new grouptabs($this->config,$this->config->data['TABS']['GROUPTABS'], $key, false); $g->by_object['group']->addUser($this->uid); - $g->dnMapping[$this->uid]= $this->dn; $g->save(); } } @@ -900,8 +901,18 @@ class posixAccount extends plugin /* Include global link_info */ $ldap= $this->config->get_ldap_link(); + /* Append groups as memberGroup: to check hook + */ + $tmp_attributes = $this->attributes; + $this->attributes[] = "memberGroup"; + $this->memberGroup = array(); + foreach($this->groupMembership as $dn => $name){ + $this->memberGroup[] = $name; + } + /* Call common method to give check the hook */ $message= plugin::check(); + $this->attributes = $tmp_attributes; /* must: homeDirectory */ if ($this->homeDirectory == ""){ @@ -1121,10 +1132,8 @@ class posixAccount extends plugin function reload() { - /* Set base for all searches */ $base = $_SESSION['CurrentMainBase']; - $base = $base; $ldap = $this->config->get_ldap_link(); $attrs = array("cn", "description", "gidNumber"); $Flags = GL_SIZELIMIT;