Code

Update posixAccount check hook.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 11 Jul 2007 06:08:30 +0000 (06:08 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 11 Jul 2007 06:08:30 +0000 (06:08 +0000)
Added group membership to check hook

git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6820 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/posix/class_posixAccount.inc

index 1578b8592c672000b8acb815e56c1a41c2ef60dd..f2155b2f1e72be5c032ed9cb2ba9a2ded4a3466a 100644 (file)
@@ -59,6 +59,7 @@ 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");
@@ -902,8 +903,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 == ""){