Revision f07df483
Von Moritz Bunkus vor fast 14 Jahren hinzugefügt
SL/AM.pm | ||
---|---|---|
1410 | 1410 |
sub save_preferences { |
1411 | 1411 |
$main::lxdebug->enter_sub(); |
1412 | 1412 |
|
1413 |
my ($self, $myconfig, $form, $webdav) = @_;
|
|
1413 |
my ($self, $myconfig, $form) = @_; |
|
1414 | 1414 |
|
1415 | 1415 |
my $dbh = $form->get_standard_dbh($myconfig); |
1416 | 1416 |
|
... | ... | |
1438 | 1438 |
|
1439 | 1439 |
my $auth = $main::auth; |
1440 | 1440 |
|
1441 |
if ($auth->can_change_password() |
|
1442 |
&& defined $form->{new_password} |
|
1443 |
&& ($form->{new_password} ne '********')) { |
|
1444 |
$auth->change_password($form->{login}, $form->{new_password}); |
|
1445 |
|
|
1446 |
$form->{password} = $form->{new_password}; |
|
1447 |
$auth->set_session_value('password', $form->{password}); |
|
1448 |
$auth->create_or_refresh_session(); |
|
1449 |
} |
|
1450 |
|
|
1451 | 1441 |
$main::lxdebug->leave_sub(); |
1452 | 1442 |
|
1453 | 1443 |
return $rc; |
bin/mozilla/am.pl | ||
---|---|---|
34 | 34 |
use utf8; |
35 | 35 |
|
36 | 36 |
use SL::Auth; |
37 |
use SL::Auth::PasswordPolicy; |
|
37 | 38 |
use SL::AM; |
38 | 39 |
use SL::CA; |
39 | 40 |
use SL::Form; |
... | ... | |
2549 | 2550 |
|
2550 | 2551 |
TODO->save_user_config('login' => $form->{login}, %{ $form->{todo_cfg} || { } }); |
2551 | 2552 |
|
2552 |
$form->redirect($locale->text('Preferences saved!')) if (AM->save_preferences(\%myconfig, \%$form, 0)); |
|
2553 |
if (AM->save_preferences(\%myconfig, $form)) { |
|
2554 |
if ($::auth->can_change_password() |
|
2555 |
&& defined $form->{new_password} |
|
2556 |
&& ($form->{new_password} ne '********')) { |
|
2557 |
my $verifier = SL::Auth::PasswordPolicy->new; |
|
2558 |
my $result = $verifier->verify($form->{new_password}); |
|
2559 |
|
|
2560 |
if ($result != SL::Auth::PasswordPolicy->OK()) { |
|
2561 |
$form->error($::locale->text('The settings were saved, but the password was not changed.') . ' ' . join(' ', $verifier->errors($result))); |
|
2562 |
} |
|
2563 |
|
|
2564 |
$::auth->change_password($form->{login}, $form->{new_password}); |
|
2565 |
|
|
2566 |
$form->{password} = $form->{new_password}; |
|
2567 |
$::auth->set_session_value('password', $form->{password}); |
|
2568 |
$::auth->create_or_refresh_session(); |
|
2569 |
} |
|
2570 |
|
|
2571 |
$form->redirect($locale->text('Preferences saved!')); |
|
2572 |
} |
|
2573 |
|
|
2553 | 2574 |
$form->error($locale->text('Cannot save preferences!')); |
2554 | 2575 |
|
2555 | 2576 |
$main::lxdebug->leave_sub(); |
locale/de/all | ||
---|---|---|
1704 | 1704 |
'The selected warehouse does not exist.' => 'Das ausgewählte Lager existiert nicht.', |
1705 | 1705 |
'The selected warehouse is empty.' => 'Das ausgewählte Lager ist leer.', |
1706 | 1706 |
'The session is invalid or has expired.' => 'Sie sind von Lx-Office abgemeldet.', |
1707 |
'The settings were saved, but the password was not changed.' => 'Die Einstellungen wurden gespeichert, aber das Passwort wurde nicht ge?ndert.', |
|
1707 | 1708 |
'The source warehouse does not contain any bins.' => 'Das Quelllager enthält keine Lagerplätze.', |
1708 | 1709 |
'The start date is missing.' => 'Das Startdatum fehlt.', |
1709 | 1710 |
'The subject is missing.' => 'Der Betreff fehlt.', |
Auch abrufbar als: Unified diff
Überprüfung der Passwortrichtlinie, wenn die Benutzerin ihr Passwort ändert