|
|
@ -109,6 +109,11 @@ sub update { |
|
|
|
} |
|
|
|
} |
|
|
|
my $error = $self->app->ldap->update($user, \%attrs); |
|
|
|
my $error = $self->app->ldap->update($user, \%attrs); |
|
|
|
die("$error\n") if $error; |
|
|
|
die("$error\n") if $error; |
|
|
|
|
|
|
|
if ($self->app->config->{user}->{allow_chpass} and |
|
|
|
|
|
|
|
my $newpass = $self->req->param('newpass')) { |
|
|
|
|
|
|
|
$error = $self->app->ldap->chpass($user, $newpass); |
|
|
|
|
|
|
|
die("$error\n") if $error; |
|
|
|
|
|
|
|
} |
|
|
|
$self->redirect_to('/user/profile'); 1; |
|
|
|
$self->redirect_to('/user/profile'); 1; |
|
|
|
} or do { |
|
|
|
} or do { |
|
|
|
$self->flash({result => "Can't save profile: $@"}); |
|
|
|
$self->flash({result => "Can't save profile: $@"}); |
|
|
|