- Timestamp:
- 10/20/08 07:23:30 (3 months ago)
- Location:
- trunk/client/mail
- Files:
-
- 2 modified
-
ChangeLog (modified) (1 diff)
-
src/EBox/MailUserLdap.pm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/mail/ChangeLog
r11513 r11514 1 1 0.12.100 2 + EBox::MailUserLdap::userAccount does not longer assumme that the user exists2 + EBox::MailUserLdap::userAccount and EBox::MailUserLdap::getUserLdapValue dont longer assumme that the user exists 3 3 0.12.99 4 4 + Add support for reporting -
trunk/client/mail/src/EBox/MailUserLdap.pm
r11513 r11514 234 234 # uid - uid of the user 235 235 # value - the atribute name 236 # 237 # Returns: 238 # the value of the attribute. Undef if either the user ot the attribute 239 # does not exists 236 240 sub getUserLdapValue #uid, ldap value 237 241 { … … 248 252 my $result = $self->{ldap}->search(\%args); 249 253 my $entry = $result->entry(0); 254 if (not defined $entry) { 255 EBox::warn("Inexistent user $uid asked for LDAP attribute $value"); 256 return undef; 257 } 258 250 259 251 260 return $entry->get_value($value); 252 261 } 253 262 263 264 # Method: existsUserLdapValue 265 # 266 # checks whether a LDAP attribute exists on a given user 267 # 268 # Parameters: 269 # 270 # uid - uid of the user 271 # value - the atribute name 272 # Returns: 273 # true if the user and the LDAP attribute exist. Undef if either the user ot the attribute 274 # does not exists 254 275 sub existsUserLdapValue 255 276 { … … 805 826 my $result = $self->{ldap}->search(\%args); 806 827 my $entry = $result->entry(0); 828 if (not defined $entry) { 829 EBox::warn("Inexistent user: $username"); 830 return (); 831 } 807 832 808 833 my $mdsize = $entry->get_value('userMaildirSize');
