Summary: | Add option to require users to enter email address twice during self-registration. | ||
---|---|---|---|
Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
Component: | OPAC | Assignee: | Aleisha Amohia <aleisha> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | 1joynelson, aleisha, david.roberts, hc, martin.renvoize |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23908 | ||
Change sponsored?: | Sponsored | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This enhancement, when enabled, requires users self-registering via the OPAC to manually enter their primary email address twice. This is to prevent users from incorrectly entering their email address and consequentially never receiving a verification email from the library.
**New system preference**: `PatronSelfRegistrationConfirmEmail` defaults to disabled.
|
Version(s) released in: |
20.05.00
|
Circulation function: | |||
Attachments: |
Bug 24913: Add PatronSelfRegistrationConfirmEmail syspref
Bug 24913: Add PatronSelfRegistrationConfirmEmail syspref Error when trying to submit self- reg. form with matching emails Bug 24913: Add PatronSelfRegistrationConfirmEmail syspref Bug 24913: Add PatronSelfRegistrationConfirmEmail syspref Warning with javascript Warning without javascript Bug 24913: Add PatronSelfRegistrationConfirmEmail syspref |
Description
Katrin Fischer
2020-03-20 13:24:01 UTC
This is a great idea and will bring us more inline with how the rest of the internets works ;) Created attachment 102891 [details] [review] Bug 24913: Add PatronSelfRegistrationConfirmEmail syspref To test: 1) update database, restart memcached/plack 2) Go to Administration -> System preferences -> OPAC tab. Enable the new PatronSelfRegistrationConfirmEmail system preference. Enable other required self registration sysprefs. 3) Go to the OPAC home page. (You may need to log out). Click the 'Register' link so you are redirected to the member entry form. 4) Notice the 'Confirm primary email' field after the 'primary email' field. Put 'a@a.com' in primary email, and 'b@b.com' in the confirm field. Scroll to the end of the form and Submit. 5) Confirm the form is not successfully submitted, and an error message is shown to indicate the email addresses do not match. 6) Confirm you cannot cut, copy or paste in either the primary email or confirm primary email fields. Confirm the right click menu doesn't work in these fields. 7) Disable javascript in your browser. 8) Repeat steps 3 and 4. 9) Confirm there is an error message to indicate the email addresses do not match. 10) Re-enable javascript. Fill in the form correctly with matching email addresses and confirm it successfully submits. 11) Disable the PatronSelfRegistrationConfirmEmail syspref. 12) Attempt to register an account on the OPAC again. Confirm the 'confirm email address' field is gone and form works as expected. Sponsored-by: TBC (just checking) Created attachment 102946 [details] [review] Bug 24913: Add PatronSelfRegistrationConfirmEmail syspref To test: 1) update database, restart memcached/plack 2) Go to Administration -> System preferences -> OPAC tab. Enable the new PatronSelfRegistrationConfirmEmail system preference. Enable other required self registration sysprefs. 3) Go to the OPAC home page. (You may need to log out). Click the 'Register' link so you are redirected to the member entry form. 4) Notice the 'Confirm primary email' field after the 'primary email' field. Put 'a@a.com' in primary email, and 'b@b.com' in the confirm field. Scroll to the end of the form and Submit. 5) Confirm the form is not successfully submitted, and an error message is shown to indicate the email addresses do not match. 6) Confirm you cannot cut, copy or paste in either the primary email or confirm primary email fields. Confirm the right click menu doesn't work in these fields. 7) Disable javascript in your browser. 8) Repeat steps 3 and 4. 9) Confirm there is an error message to indicate the email addresses do not match. 10) Re-enable javascript. Fill in the form correctly with matching email addresses and confirm it successfully submits. 11) Disable the PatronSelfRegistrationConfirmEmail syspref. 12) Attempt to register an account on the OPAC again. Confirm the 'confirm email address' field is gone and form works as expected. Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ) Created attachment 103002 [details]
Error when trying to submit self- reg. form with matching emails
During testing steps 1-9 worked successfully but when trying to submit the form with matching emails in the "primary email" and "confirm primary email" fields the attached error appears.
I got a similar error: DBIx::Class::Row::store_column(): No such column 'repeat_email' on Koha::Schema::Result::BorrowerModification at /kohadevbox/koha/Koha/Object.pm line 77 at /usr/share/perl5/DBIx/Class/Exception.pm line 77 This also feels like we could give faster feedback to the end-user. I like that we fully catch it on the serverside.. but it would be nice to also catch it clientside before submission? We already have jquery validation as a dependency.. unless my memory is failing me I think it has a very simple way to do this sort of matching validation. (In reply to Martin Renvoize from comment #6) > This also feels like we could give faster feedback to the end-user. It has JS validation and it works correctly. I only ran into the error because I was testing with JS disabled. My mistake on the JS front then.. reading the patches it just looked like it disabled copy and paste for the inputs. Hi Aleisha (and everyone involved so far :) ) I did some more testing here: - QA tools pass - Syspref is added in all the right places - With the feature disabled, both registering new patrons and making change requests for existing patrons work fine - Javascript check works fine on self reg 2 issues found: 1) When the the feature is active, you get the error other have already reported on saving the form. DBIx::Class::Row::store_column(): No such column 'repeat_email' on Koha::Schema::Result::Borrower at /home/vagrant/kohaclone/Koha/Object.pm line 77 at /usr/share/perl5/DBIx/Class/Exception.pm line 77 2) When the pref is active and the patron changes address etc in the OPAC, the second email input field doesn't show (I think that is ok, as this is a 'selfreg* feature). But: When you change the email and try to save, you get an error: The following fields contain invalid information: Emails do not match! confirm email address Please correct and resubmit. We might be missing a check somewhere for "only do this for self registrations". Created attachment 103226 [details] [review] Bug 24913: Add PatronSelfRegistrationConfirmEmail syspref To test: 1) update database, restart memcached/plack 2) Go to Administration -> System preferences -> OPAC tab. Enable the new PatronSelfRegistrationConfirmEmail system preference. Enable other required self registration sysprefs. 3) Go to the OPAC home page. (You may need to log out). Click the 'Register' link so you are redirected to the member entry form. 4) Notice the 'Confirm primary email' field after the 'primary email' field. Put 'a@a.com' in primary email, and 'b@b.com' in the confirm field. Scroll to the end of the form and Submit. 5) Confirm the form is not successfully submitted, and an error message is shown to indicate the email addresses do not match. 6) Confirm you cannot cut, copy or paste in either the primary email or confirm primary email fields. Confirm the right click menu doesn't work in these fields. 7) Disable javascript in your browser. 8) Repeat steps 3 and 4. 9) Confirm there is an error message to indicate the email addresses do not match. 10) Re-enable javascript. Fill in the form correctly with matching email addresses and confirm it successfully submits. 11) Disable the PatronSelfRegistrationConfirmEmail syspref. 12) Attempt to register an account on the OPAC again. Confirm the 'confirm email address' field is gone and form works as expected. 13) Re-enable the PatronSelfRegistrationConfirmEmail syspref. 14) Log in to the OPAC and go to your personal details 15) Edit the primary email field 16) Confirm you are able to submit your changes (you should not see an error about emails not matching). Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ) Created attachment 103273 [details] [review] Bug 24913: Add PatronSelfRegistrationConfirmEmail syspref To test: 1) update database, restart memcached/plack 2) Go to Administration -> System preferences -> OPAC tab. Enable the new PatronSelfRegistrationConfirmEmail system preference. Enable other required self registration sysprefs. 3) Go to the OPAC home page. (You may need to log out). Click the 'Register' link so you are redirected to the member entry form. 4) Notice the 'Confirm primary email' field after the 'primary email' field. Put 'a@a.com' in primary email, and 'b@b.com' in the confirm field. Scroll to the end of the form and Submit. 5) Confirm the form is not successfully submitted, and an error message is shown to indicate the email addresses do not match. 6) Confirm you cannot cut, copy or paste in either the primary email or confirm primary email fields. Confirm the right click menu doesn't work in these fields. 7) Disable javascript in your browser. 8) Repeat steps 3 and 4. 9) Confirm there is an error message to indicate the email addresses do not match. 10) Re-enable javascript. Fill in the form correctly with matching email addresses and confirm it successfully submits. 11) Disable the PatronSelfRegistrationConfirmEmail syspref. 12) Attempt to register an account on the OPAC again. Confirm the 'confirm email address' field is gone and form works as expected. 13) Re-enable the PatronSelfRegistrationConfirmEmail syspref. 14) Log in to the OPAC and go to your personal details 15) Edit the primary email field 16) Confirm you are able to submit your changes (you should not see an error about emails not matching). Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ) Signed-off-by: holly <hc@interleaf.ie> Created attachment 103274 [details]
Warning with javascript
I signed this off, but I do have one small thing to point out. When I tried submitting with mis-matched emails with Javascript enabled I got a warning beside the confirm primary email field.
When I tried submitting with mis-matched emails with Javascript disabled I got a warning at the top of the form, advising me the emails were not matching.
Should the warning be the same in both cases?
Created attachment 103275 [details]
Warning without javascript
Warning without javascript
Hi Holly, thx for testing! I think that behaviour matches how we do it in other places. When you submit the form without JavaScript, the server will validate the entries and put the warning on top when reloading the page. Thanks for explaining Katrin. I've changed the status on the bug as signed off. Created attachment 103308 [details] [review] Bug 24913: Add PatronSelfRegistrationConfirmEmail syspref To test: 1) update database, restart memcached/plack 2) Go to Administration -> System preferences -> OPAC tab. Enable the new PatronSelfRegistrationConfirmEmail system preference. Enable other required self registration sysprefs. 3) Go to the OPAC home page. (You may need to log out). Click the 'Register' link so you are redirected to the member entry form. 4) Notice the 'Confirm primary email' field after the 'primary email' field. Put 'a@a.com' in primary email, and 'b@b.com' in the confirm field. Scroll to the end of the form and Submit. 5) Confirm the form is not successfully submitted, and an error message is shown to indicate the email addresses do not match. 6) Confirm you cannot cut, copy or paste in either the primary email or confirm primary email fields. Confirm the right click menu doesn't work in these fields. 7) Disable javascript in your browser. 8) Repeat steps 3 and 4. 9) Confirm there is an error message to indicate the email addresses do not match. 10) Re-enable javascript. Fill in the form correctly with matching email addresses and confirm it successfully submits. 11) Disable the PatronSelfRegistrationConfirmEmail syspref. 12) Attempt to register an account on the OPAC again. Confirm the 'confirm email address' field is gone and form works as expected. 13) Re-enable the PatronSelfRegistrationConfirmEmail syspref. 14) Log in to the OPAC and go to your personal details 15) Edit the primary email field 16) Confirm you are able to submit your changes (you should not see an error about emails not matching). Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ) Signed-off-by: holly <hc@interleaf.ie> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Nice work everyone! Pushed to master for 20.05 enhancement not backported to 19.11.x |