Bug 22559: Restore OPAC forgotten password functionality
authorLiz Rea <wizzyrea@gmail.com>
Thu, 21 Mar 2019 01:53:54 +0000 (01:53 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 22 Mar 2019 18:56:14 +0000 (18:56 +0000)
To test:

Enable OpacResetPassword
Create a borrower with a username and password
Go to the OPAC, try to reset the password (I always get the reset link
        token out of the message_queue in the database rather than worry about
        receiving the actual email. You do you.)
Go to the link provided.
Attempt to set a password, this should fail.
Apply this patch
Go through the process again, password should be reset.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

opac/opac-password-recovery.pl

index 6429f7b..e4b5a91 100755 (executable)
@@ -13,6 +13,7 @@ use Koha::Patrons;
 use Koha::Patrons;
 my $query = new CGI;
 use HTML::Entities;
+use Try::Tiny;
 
 my ( $template, $dummy, $cookie ) = get_template_and_user(
     {