Code

Even show empty groups
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 18 May 2006 13:11:12 +0000 (13:11 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 18 May 2006 13:11:12 +0000 (13:11 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3431 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/posix/class_posixAccount.inc

index 47675b50349afa7bd241ef2adc96f6a7cf214f3b..2af3bc0fa1c2b4ee5d70ffe2102a0b9535da937c 100644 (file)
@@ -1074,9 +1074,12 @@ class posixAccount extends plugin
     $attrs    =  array("cn", "description", "gidNumber");
 
     /* Get groups */
-    $filter = 
-    $res= get_list("(&(objectClass=posixGroup)(cn=".$this->GroupRegex.")(memberUid=".$this->GroupUserRegex."))", 
-          $this->ui->subtreeACL, $base,$attrs, GL_SIZELIMIT);
+    if ($this->GroupUserRegex == '*'){
+      $filter = "(objectClass=posixGroup)";
+    } else {
+      $filter= "(&(objectClass=posixGroup)(cn=".$this->GroupRegex.")(memberUid=".$this->GroupUserRegex."))";
+    }
+    $res= get_list($filter, $this->ui->subtreeACL, $base,$attrs, GL_SIZELIMIT);
 
     /* check sizelimit */
     if (preg_match("/size limit/i", $ldap->error)){