Changeset 11513 for trunk

Show
Ignore:
Timestamp:
10/17/08 15:59:44 (3 months ago)
Author:
javier.amor.garcia@…
Message:

EBox::MailUserLdap::userAccount does not longer assumme that the user exists

Location:
trunk/client/mail
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/client/mail/ChangeLog

    r11490 r11513  
     10.12.100 
     2        + EBox::MailUserLdap::userAccount does not longer assumme that the user exists 
    130.12.99 
    24        + Add support for reporting 
  • trunk/client/mail/src/EBox/MailUserLdap.pm

    r11094 r11513  
    176176# 
    177177#  return the user mail account or undef if it doesn't exists 
     178#  In case the user does not exist undef is also returned 
    178179# 
    179180sub userAccount 
     
    194195    my $result = $self->{ldap}->search(\%args); 
    195196    my $entry = $result->entry(0); 
     197    if (not defined $entry) { 
     198        EBox::warn("Asked for user account or inexistent user $username"); 
     199        return undef; 
     200    } 
    196201     
    197202    my $usermail = $entry->get_value('mail');