summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 364d355)
raw | patch | inline | side by side (parent: 364d355)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 21 Aug 2009 07:00:52 +0000 (07:00 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 21 Aug 2009 07:00:52 +0000 (07:00 +0000) |
- Allow objects without 'cn' to be listed correctly, we just need 'uid' and 'dn' to create Acls.
- There may be gosaAccounts without cn... or not?
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14098 594d385d-05f5-0310-b6e9-bd551577e9d8
- There may be gosaAccounts without cn... or not?
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14098 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_acl.inc | patch | blob | history |
index 63a4a24025bae253bd01c1ceeca8341d56021165..b2e18704cef64ee0092b6ee25624915e8cc601d6 100644 (file)
$ldap->search('(&(objectClass=gosaAccount)(gosaUnitTag='.$tag.'))', array('uid', 'cn'));
}
while ($attrs= $ldap->fetch()){
- $this->users['U:'.$attrs['dn']]= $attrs['cn'][0].' ['.$attrs['uid'][0].']';
+
+ // Allow objects without cn to be listed without causing an error.
+ if(!isset($attrs['cn'][0])){
+ $this->users['U:'.$attrs['dn']]= $attrs['uid'][0];
+ }else{
+ $this->users['U:'.$attrs['dn']]= $attrs['cn'][0].' ['.$attrs['uid'][0].']';
+ }
+
}
ksort($this->users);