Merge remote-tracking branch 'kc/new/enh/bug_5917' into kcmaster
[koha_fer] / members / member-password.pl
index 071a5fa..0fefe4f 100755 (executable)
@@ -73,7 +73,7 @@ if ( $newpassword  && ! $errormsg ) {
     my $userid = $bor->{'userid'};
 
     my $chars='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
-    my $length=int(rand(2))+4;
+    my $length=int(rand(2))+C4::Context->preference("minPasswordLength");
     my $defaultnewpassword='';
     for (my $i=0; $i<$length; $i++) {
        $defaultnewpassword.=substr($chars, int(rand(length($chars))),1);
@@ -101,6 +101,7 @@ $template->param( picture => 1 ) if $picture;
            address => $bor->{'address'},
            address2 => $bor->{'address2'},
            city => $bor->{'city'},
+           state => $bor->{'state'},
            zipcode => $bor->{'zipcode'},
            country => $bor->{'country'},
            phone => $bor->{'phone'},