Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 4099d0e8

Von Moritz Bunkus vor fast 14 Jahren hinzugefügt

  • ID 4099d0e8f2d10fecac8bdccb82c900cb7059ab98
  • Vorgänger f07df483
  • Nachfolger 6b352f38

Überprüfung der Passwortrichtlinie, wenn die Administratorin eine Benutzerin ändert

Unterschiede anzeigen:

bin/mozilla/admin.pl
42 42
use Sys::Hostname;
43 43

  
44 44
use SL::Auth;
45
use SL::Auth::PasswordPolicy;
45 46
use SL::Form;
46 47
use SL::Iconv;
47 48
use SL::Mailer;
......
520 521

  
521 522
  $myconfig->save_member();
522 523

  
523
  if ($main::auth->can_change_password()
524
      && defined $form->{new_password}
525
      && ($form->{new_password} ne '********')) {
526
    $main::auth->change_password($form->{login}, $form->{new_password});
527
  }
528

  
529 524
  $form->{templates}       =~ s|.*/||;
530 525
  $form->{templates}       =  "$main::templates/$form->{templates}";
531 526
  $form->{mastertemplates} =~ s|.*/||;
......
578 573
    }
579 574
  }
580 575

  
581
  $form->redirect($locale->text('User saved!'));
576
  if ($main::auth->can_change_password()
577
      && defined $form->{new_password}
578
      && ($form->{new_password} ne '********')) {
579
    my $verifier = SL::Auth::PasswordPolicy->new;
580
    my $result   = $verifier->verify($form->{new_password}, 1);
581

  
582
    if ($result != SL::Auth::PasswordPolicy->OK()) {
583
      $form->error($::locale->text('The settings were saved, but the password was not changed.') . ' ' . join(' ', $verifier->errors($result)));
584
    }
582 585

  
586
    $main::auth->change_password($form->{login}, $form->{new_password});
587
  }
588

  
589
  $form->redirect($locale->text('User saved!'));
583 590
}
584 591

  
585 592
sub save_user_as_new {

Auch abrufbar als: Unified diff