[Koha-bugs] [Bug 15343] Allow patrons to choose their own password on self registration.

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Feb 1 12:52:35 CET 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15343

--- Comment #22 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Comment on attachment 47407
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47407
Bug 15343 - Allow user to set password on opac-memberentry.pl

Review of attachment 47407:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=15343&attachment=47407)
-----------------------------------------------------------------

There is a third case to check: if the password contain leading or trailing
whitespaces, see bug 14509.

::: C4/Members.pm
@@ +2482,5 @@
>      $borrower{'cardnumber'} = fixup_cardnumber();
>  
>      my $borrowernumber = AddMember(%borrower);
>  
> +    return ( $borrowernumber, $borrower{'password'} );

Why do you return the password?
You should compare the hashed password (Koha::AuthUtils::hash_password) in the
test.

::: koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt
@@ +60,5 @@
>                                  [% IF field == "email" %]<li>Contact information: <a href="#borrower_email">primary email address</a></li>[% END %]
>                                  [% IF field == "emailpro" %]<li>Contact information: <a href="#borrower_emailpro">secondary email address</a></li>[% END %]
>                                  [% IF field == "B_email" %]<li>Alternate address information: <a href="#borrower_B_email">email address</a></li>[% END %]
> +                                [% IF field == "password_match" %]<li>Passwords do not match! <a href="#password">password</a></li>[% END %]
> +                                [% IF field == "password_invalid" %]<li>Password does not meet minium requirements! <a href="#password">password</a></li>[% END %]

typo minimum.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list