This may well be my understanding at fault ;-)
What I am testing for is when a user last logged in.
It seems that Novell doesn't actually create an attribute of loginTime (or
lastLoginTime) until a user has logged in for the first time.
So when I test my $entry->get('loginTime') I get undef, i.e. there is no
attribute loginTime.
Looking in the debug traces it seems that the attribute is not returned by
the server.
I've seen this behaviour from Novell when a user does not have rights to
an attribute.
I would have expected that the attribute would exist even if it was a zero
length string.
In that case, $entry->get('loginTime') should return an array ref, the
first element of which was zero length.
Does that make sense ?
Anyway, I've managed to get around the problem (with an appropriate search
filter) so this is now just a user (i.e. me) education issue now :-)
Thanks to all for their help.
Cheers,
Simon Wilcox.
From Chris Ridd <chr...@me...>
Date 21 November 2000
To
Simon Wilcox/BASE/WilliamsLea@WilliamsLea, Time 14:15
per...@li...
Copy to
Bcc
Fax to
Subject Re: Testing for missing attributes
Sim...@wi... wrote:
> It seems that Novell does not return an attribute at all rather
> than an attribute that has a null value.
I'm not quite sure what this means.
It is not legal in LDAP to have an attribute with no values. Some
attributes have syntaxes which support values which are zero-length
strings, which is *not* the same as 'no value'. (Example: distinguished
names can be zero-length, ie the root has a string DN of "".)
Cheers,
Chris
______________________________________________________________________
This email contains proprietary information some or all of which may be
legally privileged. It is for the intended recipient only. If an addressing
or transmission error has misdirected this email, please notify the author by
replying to this email. If you are not the intended recipient you must not
use, disclose, distribute, copy, print, or reply on this email.
|