From: hickert Date: Thu, 9 Nov 2006 07:05:14 +0000 (+0000) Subject: Skip primary-group creation if this user account was edited. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f958b827d18c6a3cdf5e27b0e001787e613f3863;p=gosa.git Skip primary-group creation if this user account was edited. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5053 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/personal/posix/class_posixAccount.inc b/plugins/personal/posix/class_posixAccount.inc index fca536fb9..9db568117 100644 --- a/plugins/personal/posix/class_posixAccount.inc +++ b/plugins/personal/posix/class_posixAccount.inc @@ -852,15 +852,15 @@ class posixAccount extends plugin del_lock ("uidnumber"); - /* Posix accounts have group interrelationship, take care about these here. */ - if ($this->force_ids == 0 && $this->primaryGroup == 0){ + /* Posix accounts have group interrelationship, + take care about these here if this is a new user without forced gidNumber. */ + if ($this->force_ids == 0 && $this->primaryGroup == 0 && !$this->initially_was_account){ $ldap->cd($this->config->current['BASE']); $ldap->search("(&(objectClass=posixGroup)(gidNumber=".$this->gidNumber."))", array("cn")); /* Create group if it doesn't exist */ if ($ldap->count() == 0){ $groupdn= preg_replace ('/^'.$this->config->current['DNMODE'].'=[^,]+,'.get_people_ou().'/i', 'cn='.$this->uid.','.get_groups_ou(), $this->dn); - $g= new group($this->config, $groupdn); $g->cn= $this->uid; $g->force_gid= 1;