Code

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

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

plugins/personal/posix/class_posixAccount.inc

index 999cf166596cc16eba5d1a51fec27be5d55ca1ae..10d575bcb96d231b1ccdc69a8c1a641eb235b4c2 100644 (file)
@@ -57,7 +57,7 @@ class posixAccount extends plugin
   var $secondaryGroups= array();
   var $primaryGroup= 0;
   var $was_trust_account= FALSE;
-
+  var $memberGroup = array();
   var $grouplist  = array();
   var $ui         = array();
 
@@ -925,8 +925,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 == ""){