[pmwiki-users] YALP (Yet Another LDAP Patch)

Patrick R. Michaud pmichaud at pobox.com
Tue Aug 22 12:36:03 CDT 2006


On Tue, Aug 22, 2006 at 04:00:14PM +0200, Thomas -Balu- Walter wrote:
> I've just figured out that you can not have a filter option in your
> ldap://-URL which is needed here on campus. 

Ick.

> So I thought I'd fix this:

Nice!

However, in keeping with the Apache spec upon which this is
based [1], I'll probably go with:

       list($basedn, $attr, $sub, $filter) = explode('?', $path);
       if (!$attr) $attr = 'uid';
       if (!$sub) $sub = 'one';
       if (!$filter) $filter = "(objectClass=*)";
       # ...
       $sr = $fn($ds, $basedn, "(&$filter($attr=$id))", array($attr));

This basically reverses the order of the $filter and ($attr=$id),
as well as providing a default value for $filter when one isn't
provided.

Thanks!

Pm

1. http://httpd.apache.org/docs/2.0/mod/mod_auth_ldap.html#authldapurl




More information about the pmwiki-users mailing list