@@ -, +, @@ tool --- installer/onboarding.pl | 9 ++++++++- koha-tmpl/intranet-tmpl/prog/en/includes/onboarding_messages.inc | 6 ++++++ 2 files changed, 14 insertions(+), 1 deletion(-) --- a/installer/onboarding.pl +++ a/installer/onboarding.pl @@ -146,6 +146,8 @@ if ( $step == 3 ) { my $cardnumber = $input->param('cardnumber'); my $userid = $input->param('userid'); + my ( $is_valid, $passworderror) = Koha::AuthUtils::is_password_valid( $firstpassword ); + if ( my $error_code = checkcardnumber($cardnumber) ) { if ( $error_code == 1 ) { push @messages, { code => 'ERROR_cardnumber_already_exists' }; @@ -158,8 +160,13 @@ if ( $step == 3 ) { push @messages, { code => 'ERROR_password_mismatch' }; } - else { + elsif ( $passworderror) { + push @messages, { code => 'ERROR_password_too_short'} if $passworderror eq 'too_short'; + push @messages, { code => 'ERROR_password_too_weak'} if $passworderror eq 'too_weak'; + push @messages, { code => 'ERROR_password_has_whitespaces'} if $passworderror eq 'has_whitespaces'; + } + else { my $patron_data = { surname => scalar $input->param('surname'), firstname => scalar $input->param('firstname'), --- a/koha-tmpl/intranet-tmpl/prog/en/includes/onboarding_messages.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/onboarding_messages.inc @@ -26,6 +26,12 @@
Circulation rule created!
[% CASE 'error_on_insert_circ_rule' %]
Circulation rule not created!
+ [% CASE 'ERROR_password_too_short' %] +
The patron has not been created the entered password was too short
+ [% CASE 'ERROR_password_too_weak' %] +
The patron has not been created the entered password was too weak, must contain at least one uppercase, and lower case letter and one number
+ [% CASE 'ERROR_password_has_whitespaces' %] +
The patron has not been created the entered password contained whitespaces
[% CASE %][% message %] [% END %] [% END %] --