Bug 18616 - The "Add forgot password link to OPAC" should allow patrons to use their library card number in addition to username
Summary: The "Add forgot password link to OPAC" should allow patrons to use their libr...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 8753 16711
Blocks:
  Show dependency treegraph
 
Reported: 2017-05-16 21:34 UTC by David Kuhn
Modified: 2019-10-14 19:56 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 18616 - The "Add forgot password link to OPAC" should allow patrons to use their library card number in addition to username (1.70 KB, patch)
2017-05-30 20:33 UTC, David Kuhn
Details | Diff | Splinter Review
Updated comment in code to reflect the change (and make gender neutral). (966 bytes, patch)
2017-05-31 15:23 UTC, David Kuhn
Details | Diff | Splinter Review
Bug 18616 - The "Add forgot password link to OPAC" should allow patrons to use their library card number in addition to username (1.87 KB, patch)
2017-05-31 18:18 UTC, Marc Véron
Details | Diff | Splinter Review
Updated comment in code to reflect the change (and make gender neutral). (1.08 KB, patch)
2017-05-31 18:19 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 18616 - The "Add forgot password link to OPAC" should allow patrons to use their library card number in addition to username (2.20 KB, patch)
2017-06-06 19:29 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 18616 - The "Add forgot password link to OPAC" should allow patrons to use their library card number in addition to username (2.04 KB, patch)
2017-06-23 23:20 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Kuhn 2017-05-16 21:34:06 UTC
Bug 8753 will only accept the patron's username. However some libraries do not use the username for identifying patrons, only their library card number.

The "Forgot your password" feature should allow patrons to enter either their username or their card number in the Log In box (in addition to their email address) in order to reset their password.
Comment 1 David Kuhn 2017-05-30 20:33:10 UTC
Created attachment 63855 [details] [review]
Bug 18616 - The "Add forgot password link to OPAC" should allow patrons to use their library card number in addition to username

Allow patrons to enter either their library card number or user name in the "Log in" box for password recovery.

Most patrons at our library use their card number to log in and are unaware of what their userid is. However there are some who have set a

customized userid and would prefer to use that. This patch would allow either to be entered for password recovery.

To test:
1. Enable the password recovery feature.
2. In the OPAC, click on "Forgot you password?" link and enter a valid library card number.
3. The error message "No account found with the provided information" appears.
4. Apply the patch.
5. Repeat step 2. The recovery email is now sent.
Comment 2 Marc Véron 2017-05-31 05:45:47 UTC
Tested - patch works as advertised.

Tiny issue:

Comment on line 59 reads:
# Find the borrower by his userid or email

Can you change the comment to reflect the code change (and make it gender neutral)? 
Maybe something like:
# Find patron by cardnumber, userid or email
Comment 3 David Kuhn 2017-05-31 15:23:17 UTC
Created attachment 63881 [details] [review]
Updated comment in code to reflect the change (and make gender neutral).
Comment 4 Marc Véron 2017-05-31 18:18:02 UTC
Created attachment 63882 [details] [review]
Bug 18616 - The "Add forgot password link to OPAC" should allow patrons to use their library card number in addition to username

Allow patrons to enter either their library card number or user name in the "Log in" box for password recovery.

Most patrons at our library use their card number to log in and are unaware of what their userid is. However there are some who have set a

customized userid and would prefer to use that. This patch would allow either to be entered for password recovery.

To test:
1. Enable the password recovery feature.
2. In the OPAC, click on "Forgot you password?" link and enter a valid library card number.
3. The error message "No account found with the provided information" appears.
4. Apply the patch.
5. Repeat step 2. The recovery email is now sent.

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Comment 5 Marc Véron 2017-05-31 18:19:10 UTC
Created attachment 63883 [details] [review]
Updated comment in code to reflect the change (and make gender neutral).

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

Signed-off-by: Marc Véron <veron@veron.ch>
Comment 6 Marc Véron 2017-06-06 16:01:06 UTC
Hi David

We have merge conflicts with Bug 16711: OPAC Password recovery: Handling if multiple accounts have the same mail address

This patch is a one liner only, is it possible to redo it on top of 16711?
Thanks!

Marc
Comment 7 David Kuhn 2017-06-06 16:53:17 UTC
OK, I added the code to bug 16711. Should this bug be made obsolete?
Comment 8 Marc Véron 2017-06-06 19:28:42 UTC
(In reply to David Kuhn from comment #7)
> OK, I added the code to bug 16711. Should this bug be made obsolete?

Oh, I did not want to "steal" your patch :-)
With "On top" I wanted to say: Make your patch dependent 16711.

My original idea was the following:
- First apply the patch from 16711
- Then do your changes for the library card number
- Then attach your patch here (and obsolete the old ones)
- Update "Depends on" and add 16711
- Obsolete the patch you added to 16711

Hmm, I could simply sign off your new patch and add it here...
Lets see..
Comment 9 Marc Véron 2017-06-06 19:29:34 UTC
Created attachment 64066 [details] [review]
Bug 18616 - The "Add forgot password link to OPAC" should allow patrons to use their library card number in addition to username

Allow patrons to enter either their library card number or user name in the "Log in" box for password recovery.

Most patrons at our library use their card number to log in and are unaware of what their userid is. However there are some who have set a

customized userid and would prefer to use that. This patch would allow either to be entered for password recovery.

To test:
1. Enable the password recovery feature.
2. In the OPAC, click on "Forgot you password?" link and enter a valid library card number.
3. The error message "No account found with the provided information" appears.
4. Apply the patch.
5. Repeat step 2. The recovery email is now sent.

Note: Moved patch from 16711 back here and re-tested.
Signed-off-by: Marc Véron <veron@veron.ch>
Comment 10 David Kuhn 2017-06-06 19:51:19 UTC
Thanks, Marc - I'm still kind of new at this.

David
Comment 11 Nick Clemens 2017-06-23 23:20:50 UTC
Created attachment 64608 [details] [review]
Bug 18616 - The "Add forgot password link to OPAC" should allow patrons to use their library card number in addition to username

Allow patrons to enter either their library card number or user name in the "Log in" box for password recovery.

Most patrons at our library use their card number to log in and are unaware of what their userid is. However there are some who have set a

customized userid and would prefer to use that. This patch would allow either to be entered for password recovery.

To test:
1. Enable the password recovery feature.
2. In the OPAC, click on "Forgot you password?" link and enter a valid library card number.
3. The error message "No account found with the provided information" appears.
4. Apply the patch.
5. Repeat step 2. The recovery email is now sent.

Note: Moved patch from 16711 back here and re-tested.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 12 Jonathan Druart 2017-07-06 18:50:11 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 13 Fridolin Somers 2017-07-12 10:01:43 UTC
Enhancement not pushed to 17.05.x
Comment 14 Katrin Fischer 2017-07-16 13:06:18 UTC
I feel like this would make this crucial feature much more useful as not all libraries are not using the userid, but the cardnumber as primary identification for the uses. Could be seen as an oversight of the initial implementation. 

Could you consider backporting this, Fridolin?
Comment 15 Fridolin Somers 2017-07-19 10:23:20 UTC
(In reply to Katrin Fischer from comment #14)
> I feel like this would make this crucial feature much more useful as not all
> libraries are not using the userid, but the cardnumber as primary
> identification for the uses. Could be seen as an oversight of the initial
> implementation. 
> 
> Could you consider backporting this, Fridolin?

Yep since 16711 is in stable I will test this small patch
Comment 18 Katrin Fischer 2017-09-16 07:00:12 UTC
Fridolin, now that bug 18653 is resolved, would you reconsider?
Comment 19 Fridolin Somers 2017-09-29 08:12:10 UTC
(In reply to Katrin Fischer from comment #18)
> Fridolin, now that bug 18653 is resolved, would you reconsider?

Depends now on Bug 18956
Comment 20 Katrin Fischer 2017-11-15 20:29:27 UTC
(In reply to Fridolin SOMERS from comment #19)
> (In reply to Katrin Fischer from comment #18)
> > Fridolin, now that bug 18653 is resolved, would you reconsider?
> 
> Depends now on Bug 18956

Bug 18956 is now pushed into stable releases... Now? ;)
Comment 21 Fridolin Somers 2017-11-20 12:57:07 UTC
Pushed to 17.05.x, will be in 17.05.06.

No problem now ;)
Comment 22 Katrin Fischer 2017-11-20 21:22:52 UTC
This patch has been pushed to 16.11.x and will be in 16.11.14.
Comment 23 Mason James 2017-11-23 23:25:32 UTC
Pushed to 16.05.x, for 16.05.19 release