Changeset 298


Ignore:
Timestamp:
07/28/09 02:38:56 (15 years ago)
Author:
nanardon
Message:
  • improve error message
File:
1 edited

Legend:

Unmodified
Added
Removed
  • LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Objects.pm

    r257 r298  
    44use strict; 
    55use warnings; 
     6use LATMOS::Accounts::Log; 
    67 
    78our $VERSION = (q$Rev$ =~ /^Rev: (\d+) /)[0]; 
     
    241242        my @salt_char = (('a' .. 'z'), ('A' .. 'Z'), (0 .. 9), '/', '.'); 
    242243        my $salt = join('', map { $salt_char[rand(scalar(@salt_char))] } (1 .. 8)); 
    243         $self->set_fields($field, crypt($clear_pass, '$1$' . $salt)); 
     244        return $self->set_fields($field, crypt($clear_pass, '$1$' . $salt)); 
     245    } else { 
     246        $self->log(LA_WARN, 
     247            "Cannot set password: userPassword attributes is unsupported"); 
    244248    } 
    245249} 
     
    328332        1; 
    329333    $max ||= 65635; 
     334    $base->log(LA_DEBUG, "Trying to find %s in range %d - %d", 
     335        $field, $min, $max); 
    330336    my %existsid; 
    331337    foreach ($base->list_objects($class->type)) { 
Note: See TracChangeset for help on using the changeset viewer.