This is a static dump of issues in the old "Flyspray" bugtracker for DokuWiki. Bugs and feature requests
are now tracked at the issue tracker at Github.
Closed
Fixed
FS#1004 empty memberof with AD
ACL & Authentication
2006-12-15ajw
Logging in with AD LDAP authentication and using $conf['auth']['ldap']['mapping']['grps'] = array('memberof' => '/CN=(.+?),/i');
If a user has no groups, I get this error:
Warning: Invalid argument supplied for foreach() in /home/www/dokuwiki/dokuwiki-2006-11-06/inc/auth/ldap.class.php on line 195
I put an if statement at line 195 of ldap.class.php to fix this:
if ($user_result[$key]) {
foreach($user_result[$key] as $grp){
if (preg_match($regexp,$grp,$match)) {
if($localkey == 'grps') {
$info[$localkey][] = $match[1];
} else {
$info[$localkey] = $match[1];
}
}
}
}
2007-06-21BlackFog
This warning occurs if the user is set to a primary group only.
I assume it's because of the different group membership assignment techniques in ldap: The primary group is set in the user object and additional groups are assigned in the group objects. So catching an empty array should not be wrong here.