Bug 16275 - Prevent patron self registration if the email already filled in borrowers.email
Summary: Prevent patron self registration if the email already filled in borrowers.email
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 19366
  Show dependency treegraph
 
Reported: 2016-04-15 13:12 UTC by Nicolas Legrand
Modified: 2018-06-04 20:10 UTC (History)
7 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Medium patch
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 16275: Add the new pref PatronSelfRegistrationEmailMustBeUnique (3.58 KB, patch)
2016-04-25 09:02 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16275: Do not allow a self registration with an existing email address (3.10 KB, patch)
2016-04-25 09:02 UTC, Jonathan Druart
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 16275: Add the new pref PatronSelfRegistrationEmailMustBeUnique (3.66 KB, patch)
2016-04-30 18:05 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 16275: Do not allow a self registration with an existing email address (3.20 KB, patch)
2016-04-30 18:05 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 16275: Add the new pref PatronSelfRegistrationEmailMustBeUnique (3.71 KB, patch)
2016-05-04 09:22 UTC, Nicolas Legrand
Details | Diff | Splinter Review
Bug 16275: Do not allow a self registration with an existing email address (3.24 KB, patch)
2016-05-04 09:23 UTC, Nicolas Legrand
Details | Diff | Splinter Review
[PASSED QA] Bug 16275: Add the new pref PatronSelfRegistrationEmailMustBeUnique (3.78 KB, patch)
2016-08-01 22:38 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 16275: Do not allow a self registration with an existing email address (3.31 KB, patch)
2016-08-01 22:39 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Legrand 2016-04-15 13:12:16 UTC
Some of our patrons are not sure they succeed their self registration and self register multiple times. We would like to prevent this by blocking the selfregistration if the field borrowers.email is already filled by the same email address.
Comment 1 Jonathan Druart 2016-04-25 09:02:47 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2016-04-25 09:02:52 UTC Comment hidden (obsolete)
Comment 3 Bernardo Gonzalez Kriegel 2016-04-30 18:05:27 UTC Comment hidden (obsolete)
Comment 4 Bernardo Gonzalez Kriegel 2016-04-30 18:05:35 UTC Comment hidden (obsolete)
Comment 5 Nicolas Legrand 2016-05-04 09:22:58 UTC Comment hidden (obsolete)
Comment 6 Nicolas Legrand 2016-05-04 09:23:06 UTC Comment hidden (obsolete)
Comment 7 Katrin Fischer 2016-07-26 21:38:33 UTC
In general this seems to work nicely without enforcing email verification (PatronSelfRegistrationVerifyByEmail).

I ran into problems testing with email verification, because of bug 16985.

It seems you can register as many patrons as you want with the same e-mail as long as they are not confirmed. I wanted to test to the second patron to use the confirmation link, but can't right now. Jonathan, can you describe what should happen?
Comment 8 Jonathan Druart 2016-08-01 10:45:50 UTC
(In reply to Katrin Fischer from comment #7)
> It seems you can register as many patrons as you want with the same e-mail
> as long as they are not confirmed. I wanted to test to the second patron to
> use the confirmation link, but can't right now. Jonathan, can you describe
> what should happen?

Yes, it is the expected behavior. The test is only done on registered patrons.
Comment 9 Katrin Fischer 2016-08-01 22:38:24 UTC
Created attachment 53862 [details] [review]
[PASSED QA] Bug 16275: Add the new pref PatronSelfRegistrationEmailMustBeUnique

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No errors

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Katrin Fischer 2016-08-01 22:39:16 UTC
Created attachment 53863 [details] [review]
[PASSED QA] Bug 16275: Do not allow a self registration with an existing email address

To avoid multiple registrations, it would be good to check the unicity
of the primary email address.
This patchset adds a new pref PatronSelfRegistrationEmailMustBeUnique.
If on, a patron will get "This email address already exists in our
database" if he try to register with an existing email address.

Test plan:
1/ Register a new patron with an email address
2/ Make an other registration using the same email address
=> With the pref PatronSelfRegistrationEmailMustBeUnique on, you won't be allowed
=> With the pref off, no change should be noticed.

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described, no errors.

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Christopher Brannon 2016-08-15 14:18:11 UTC
I am grateful that this is a preference and not a behavior change.  We have many family members that use the same e-mail address for more than one account, and this would make it impossible for them to register more than one family member.
Comment 12 Katrin Fischer 2016-08-15 14:31:36 UTC
It's totally optional - I tested with the option being off as well.
Comment 13 Kyle M Hall 2016-09-09 12:57:34 UTC
Pushed to master for 16.11, thanks Jonathan!