- Timestamp:
- 01/12/10 19:10:45 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Users.pm
r545 r585 52 52 if ($c->req->param('passwd') eq ($c->req->param('cpasswd') || '')) { 53 53 my $sync = $c->model('Accounts')->sync_access; 54 55 # This is widelly burk: 56 # synchaccess do not manage connect() at time, opening a 57 # backdoor then :\ 58 foreach ($sync->bases) { $_->{_user} = $c->user->{username} } 59 54 60 my $suser = $sync->get_object('user', $username); 55 if ($suser && $suser->set_password($c->req->param('passwd'))) { 56 $c->stash->{pchanged} = 1; 61 my $msg = $c->stash->{user}->check_password($c->req->param('passwd')); 62 if ($msg ne 'ok') { 63 $c->stash->{pmerror} = $msg . ', mot de passe inchangé'; 64 } elsif ($suser && $suser->set_password($c->req->param('passwd'))) { 65 $c->stash->{pmerror} = 'Mot de passe changé'; 57 66 $sync->commit; 58 67 } else { 59 $c->stash->{ notchanged} = 1;68 $c->stash->{pmerror} = 'Erreur lors du changement de mot de passe'; 60 69 } 61 70 } else { 62 $c->stash->{pm ismatch} = 1;71 $c->stash->{pmerror} = 'Mot de passe différents'; 63 72 } 64 73 }
Note: See TracChangeset
for help on using the changeset viewer.