Currently patron passwords are auto-generated and a patron must either immediately log in to change their password and/or record them. This patch would simply allow the patron to create their password during registration. Work to be done: * Extend AddMember_Opac to allow passing in the password. * Add update to make password field hidden by default. * Add password/confirm password fields and relevant error messages to opac-memberentry.pl.
Created attachment 45861 [details] [review] Bug 15343 - Allow user to set password on opac-memberentry.pl This patch allows patrons to create thier own password during OPAC self registration. It sets the password field to be hidden by default, and allows for a system generated password if no password is supplied and field is not mandatory 1 - Apply patch 2 - run updatedatabase.pl 3 - Check syspref "PatronSelfRegistrationBorrowerUnwantedField" - it should contain 'password' 4 - Check self registration on opac - there should be no change 5 - Remove 'password' from PatronSelfRegistrationBorrowerUnwantedField 6 - Password field should now be visible in OPAC self registration 7 - Register a patron: If no passwor is supplied you should get a system generated password 8 - Register a patron with a password, your password should be used 9 - Add 'password' to PatronSelfRegistrationBorrowerMnadatoryField 10 - Attempt to register a patron with no password - it should fail 11 - Try all combinations if mismatched/short/missing passwords and view correct error messages 12 - prove t/db_dependent/Members.t Sponsored by : Do Space (www.dospace.org)
1) "Contact information" should be "Password" 2) Don't pass sysprefs from the script to the template, use Koha.Preference() 3) minPasswordLength is optional, we cannot always assume it is set 4) Password field when does not follow convention completely when mandatory
Created attachment 45866 [details] [review] Bug 15343 [QA Followup] - Fix issues 1) "Contact information" should be "Password" 2) Don't pass sysprefs from the script to the template, use Koha.Preference() 3) minPasswordLength is optional, we cannot always assume it is set 4) Password field when does not follow convention completely when mandatory
Created attachment 45867 [details] [review] Bug 15343 [QA Followup] - Fix issues 1) "Contact information" should be "Password" 2) Don't pass sysprefs from the script to the template, use Koha.Preference() 3) minPasswordLength is optional, we cannot always assume it is set 4) Password field when does not follow convention completely when mandatory
Created attachment 45868 [details] [review] Bug 15343 [QA Followup] - Fix issues 1) "Contact information" should be "Password" 2) Don't pass sysprefs from the script to the template, use Koha.Preference() 3) minPasswordLength is optional, we cannot always assume it is set 4) Password field when does not follow convention completely when mandatory
Created attachment 45869 [details] [review] Bug 15343 [QA Followup] - Fix issues 1) "Contact information" should be "Password" 2) Don't pass sysprefs from the script to the template, use Koha.Preference() 3) minPasswordLength is optional, we cannot always assume it is set 4) Password field when does not follow convention completely when mandatory Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
With this patch, the verification box doesn't show, and you cannot complete a self registration. You will always get the message "You typed in the wrong characters in the box before submitting. Please try again." I like the idea of this though. Liz
Hi Liz, I tested in Firefox and Chrome and could not recreate this issue, can you check again? Moving back to Needs Signoff -Nick
(In reply to Liz Rea from comment #7) > With this patch, the verification box doesn't show, and you cannot complete > a self registration. You will always get the message "You typed in the wrong > characters in the box before submitting. Please try again." Same for me. Iceweasel 38.5.0 and Chromium 47.0.2526.80 on Debian. Here are my settings: PatronSelfRegistration - "Allow" PatronSelfRegistrationAdditionalInstructions - Empty PatronSelfRegistrationBorrowerMandatoryField - surname|firstname PatronSelfRegistrationBorrowerUnwantedField - password PatronSelfRegistrationDefaultCategory - T PatronSelfRegistrationExpireTemporaryAccountsDelay - 14 PatronSelfRegistrationVerifyByEmail - Require
Created attachment 46705 [details] [review] Bug 15343 [QA Follow up] Fix captcha display Make captcha visible even if password field is hidden
(In reply to Nick Clemens from comment #1) > 8 - Register a patron with a password, your password should be used At this step I'm getting an error: DBIx::Class::Row::store_column(): No such column 'password2' on Koha::Schema::Result::BorrowerModification at /home/oleonard/kohaclone/Koha/Borrower/Modifications.pm line 65
Created attachment 46737 [details] [review] Bug 15343 [QA Follow up] Fix captcha display Make captcha visible even if password field is hidden Remove password confirmation field before submitting modification
Created attachment 47320 [details] [review] Bug 15343 - Allow user to set password on opac-memberentry.pl This patch allows patrons to create thier own password during OPAC self registration. It sets the password field to be hidden by default, and allows for a system generated password if no password is supplied and field is not mandatory 1 - Apply patch 2 - run updatedatabase.pl 3 - Check syspref "PatronSelfRegistrationBorrowerUnwantedField" - it should contain 'password' 4 - Check self registration on opac - there should be no change 5 - Remove 'password' from PatronSelfRegistrationBorrowerUnwantedField 6 - Password field should now be visible in OPAC self registration 7 - Register a patron: If no passwor is supplied you should get a system generated password 8 - Register a patron with a password, your password should be used 9 - Add 'password' to PatronSelfRegistrationBorrowerMnadatoryField 10 - Attempt to register a patron with no password - it should fail 11 - Try all combinations if mismatched/short/missing passwords and view correct error messages 12 - prove t/db_dependent/Members.t Sponsored by : Do Space (www.dospace.org) Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com> ByWater internal signoff, still needs community signoff. Code looks decent and works as expected.
Created attachment 47321 [details] [review] Bug 15343 [QA Followup] - Fix issues 1) "Contact information" should be "Password" 2) Don't pass sysprefs from the script to the template, use Koha.Preference() 3) minPasswordLength is optional, we cannot always assume it is set 4) Password field when does not follow convention completely when mandatory Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Created attachment 47322 [details] [review] Bug 15343 [QA Follow up] Fix captcha display Make captcha visible even if password field is hidden Remove password confirmation field before submitting modification Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
I tried to test this, but I can't get the self registration to show in OPAC. PatronSelfRegistration is set to allow. Am I missing something?
(In reply to Mirko Tietgen from comment #16) > I tried to test this, but I can't get the self registration to show in OPAC. > PatronSelfRegistration is set to allow. Am I missing something? You also need to set the PatronSelfRegistrationDefaultCategory Nicole
Thanks Nicole, that helped! Maybe it should be in the manual. :P
Created attachment 47407 [details] [review] Bug 15343 - Allow user to set password on opac-memberentry.pl This patch allows patrons to create thier own password during OPAC self registration. It sets the password field to be hidden by default, and allows for a system generated password if no password is supplied and field is not mandatory 1 - Apply patch 2 - run updatedatabase.pl 3 - Check syspref "PatronSelfRegistrationBorrowerUnwantedField" - it should contain 'password' 4 - Check self registration on opac - there should be no change 5 - Remove 'password' from PatronSelfRegistrationBorrowerUnwantedField 6 - Password field should now be visible in OPAC self registration 7 - Register a patron: If no passwor is supplied you should get a system generated password 8 - Register a patron with a password, your password should be used 9 - Add 'password' to PatronSelfRegistrationBorrowerMnadatoryField 10 - Attempt to register a patron with no password - it should fail 11 - Try all combinations if mismatched/short/missing passwords and view correct error messages 12 - prove t/db_dependent/Members.t Sponsored by : Do Space (www.dospace.org) Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com> Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Created attachment 47408 [details] [review] Bug 15343 [QA Followup] - Fix issues 1) "Contact information" should be "Password" 2) Don't pass sysprefs from the script to the template, use Koha.Preference() 3) minPasswordLength is optional, we cannot always assume it is set 4) Password field when does not follow convention completely when mandatory Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com> Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Created attachment 47409 [details] [review] Bug 15343 [QA Follow up] Fix captcha display Make captcha visible even if password field is hidden Remove password confirmation field before submitting modification Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com> Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Comment on attachment 47407 [details] [review] Bug 15343 - Allow user to set password on opac-memberentry.pl Review of attachment 47407 [details] [review]: ----------------------------------------------------------------- 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.
(In reply to Jonathan Druart from comment #22) > > + return ( $borrowernumber, $borrower{'password'} ); > > Why do you return the password? This was already done before my change. The password is returned in the case of an auto generated password so that the patron may know their password. I suppose it does not need to be captured and displayed if a password is submitted, but in the other case I think it must remain Will work on that and the others ASAP
(In reply to Nick Clemens from comment #23) > (In reply to Jonathan Druart from comment #22) > > > + return ( $borrowernumber, $borrower{'password'} ); > > > > Why do you return the password? > > This was already done before my change. Ha yes, I misread the diff! Fix not needed :)
Created attachment 47705 [details] [review] Bug 15343 [QA Followup] * Check for leading/trailing spaces in password * Check hashed password in tests
Created attachment 47794 [details] [review] Bug 15343 - Allow user to set password on opac-memberentry.pl This patch allows patrons to create thier own password during OPAC self registration. It sets the password field to be hidden by default, and allows for a system generated password if no password is supplied and field is not mandatory 1 - Apply patch 2 - run updatedatabase.pl 3 - Check syspref "PatronSelfRegistrationBorrowerUnwantedField" - it should contain 'password' 4 - Check self registration on opac - there should be no change 5 - Remove 'password' from PatronSelfRegistrationBorrowerUnwantedField 6 - Password field should now be visible in OPAC self registration 7 - Register a patron: If no passwor is supplied you should get a system generated password 8 - Register a patron with a password, your password should be used 9 - Add 'password' to PatronSelfRegistrationBorrowerMnadatoryField 10 - Attempt to register a patron with no password - it should fail 11 - Try all combinations if mismatched/short/missing passwords and view correct error messages 12 - prove t/db_dependent/Members.t Sponsored by : Do Space (www.dospace.org) Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com> Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 47795 [details] [review] Bug 15343 [QA Followup] - Fix issues 1) "Contact information" should be "Password" 2) Don't pass sysprefs from the script to the template, use Koha.Preference() 3) minPasswordLength is optional, we cannot always assume it is set 4) Password field when does not follow convention completely when mandatory Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com> Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 47796 [details] [review] Bug 15343 [QA Follow up] Fix captcha display Make captcha visible even if password field is hidden Remove password confirmation field before submitting modification Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com> Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 47797 [details] [review] Bug 15343 [QA Followup] * Check for leading/trailing spaces in password * Check hashed password in tests Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to Master - Should be in the May 2016 Release. Thanks!
Any chance this can be ported to make it in 3.22.8? Christopher
What version will this feature be available in?
(In reply to Christopher Brannon from comment #32) > What version will this feature be available in? Hi Christopher, This should be in 16.05 (the version following 3.22), as an enhancement it is not likely to be backported to any earlier versions. -Nick