mozilla/vinz-clortho — pull request #102 by floatingatoll (2013-07-02 17:10:11+00:00)
Title: Fixes #101 by replacing o=com,dc=mozilla with dc=mozilla and extending t...

Fixes #101 by replacing o=com,dc=mozilla with dc=mozilla and extending the LDAP filter

Previously, this was searching o=com,dc=mozilla, which excludes some percentage of users who are under o=org,dc=mozilla.

This patch modifies the search in two ways, to search *both* o=com and o=org.

(1) o=com,dc=mozilla is replaced by dc=mozilla, widening the search scope to include both o=com, o=org, and many other o= results.
(2) The search filter, which previously was (|(mail=?)(zimbraAlias=?)), is extended to also require either o=org or o=com using the approximate syntax (&(|(mail)(zimbraAlias))(|(org)(com)))

If in the future additional filters are required, they would be added as additional () groups inside the outermost (&...) filter, as follows:

(& (|(mail)(zimbraAlias)) (|(org)(com)) (...) )