On 10/12/06, Peter Marschall <[EMAIL PROTECTED]> wrote:
Hi,
Hi Peter!


> My problem is that if I filter for
> (&(|(uid=$userid)(cn=$userid))(mail=*))
> the query returns NOTHING if a user happens not to have
> a cn or a uid, while what I was hoping to get one of them
> because of the or.
The filter looks O.K. to me.
It should match objects that have the mail attribute set and
uid=$userid or cn=$userid. I.e. it suffices if one of uid or cn matches.
That's what I hoped for.

Do you mean it fails to find entries that have the uid attribute set,
but miss the cn attribute (or vice versa)?
That is exactly the case.  And it doesn't fail as in giving me an
error, it just silently doesn't return anything if one of the
attributes happens not to be defined.

It so, then it might be a problem with the data in the directory
or the directory configuration.
Well, there IS a problem.  As I said - some users don't have a cn,
some don't have a uid, and as I found out yesterday, some don't
have either. (only six out of 8000).

My other idea was the (since I have to query anonymously) that I
don't have permissions on some of those attributes for some of
the users;  but even so, I still would have expected the OR to work.


Regars
Peter
Cheers,
Andrej

Reply via email to