Bugzilla – Attachment 114291 Details for
Bug 26941
Missing OPAC password recovery error messages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26941: Fix OPAC password recovery error messages
Bug-26941-Fix-OPAC-password-recovery-error-message.patch (text/plain), 3.52 KB, created by
Lucas Gass (lukeg)
on 2020-12-09 22:53:16 UTC
(
hide
)
Description:
Bug 26941: Fix OPAC password recovery error messages
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2020-12-09 22:53:16 UTC
Size:
3.52 KB
patch
obsolete
>From af92126d587e86d3245bf54c698eafe70b3753e4 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Thu, 5 Nov 2020 15:52:47 +0100 >Subject: [PATCH] Bug 26941: Fix OPAC password recovery error messages > >In OPAC password recovery perl opac/opac-password-recovery.pl >there are some error codes not in Template koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt > >This patch fixes several bugs: >- remove 'use Koha::Patrons' defined twice >- remove vars $errTooManyEmailFound $errBadEmail, not used in any template >- add in template text for error 'errNoBorrowerEmail' > >1) Create a patron A with login but no email >2) Create a patron B with login and valid email >3) Go to system preferences set 'OpacResetPassword' to ON >4) Make sure that OpacPasswordChange is also ON >5) Go to 'Forgot your password' in OPAC >6) Enter login if patron A and save >=> You get message 'This account has no email address we can send the email to.' >7) Enter login if patron B and save >=> Password recovery is send, no error message > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt | 2 ++ > opac/opac-password-recovery.pl | 6 ------ > 2 files changed, 2 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt >index fe5de79ea2..045d15ab2d 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt >@@ -84,6 +84,8 @@ > [% ELSIF (errMultipleAccountsForEmail) %] > Account identification with this email address only is ambiguous. > <br />Please use the field 'Login' as well. >+ [% ELSIF (errNoBorrowerEmail) %] >+ This account has no email address we can send the email to. > [% ELSIF (errAlreadyStartRecovery) %] > The process of password recovery has already been started for this account > [% IF username %] >diff --git a/opac/opac-password-recovery.pl b/opac/opac-password-recovery.pl >index f4686bbb37..c0be4598d5 100755 >--- a/opac/opac-password-recovery.pl >+++ b/opac/opac-password-recovery.pl >@@ -10,7 +10,6 @@ use C4::Context; > use Koha::Patron::Password::Recovery > qw(SendPasswordRecoveryEmail ValidateBorrowernumber GetValidLinkInfo CompletePasswordRecovery DeleteExpiredPasswordRecovery); > use Koha::Patrons; >-use Koha::Patrons; > my $query = CGI->new; > use HTML::Entities; > use Try::Tiny; >@@ -42,8 +41,6 @@ my $errNoBorrowerFound; > my $errNoBorrowerEmail; > my $errMultipleAccountsForEmail; > my $errAlreadyStartRecovery; >-my $errTooManyEmailFound; >-my $errBadEmail; > my $errResetForbidden; > > #new password form error >@@ -123,11 +120,8 @@ if ( $query->param('sendEmail') || $query->param('resendEmail') ) { > if ($hasError) { > $template->param( > hasError => 1, >- > errNoBorrowerFound => $errNoBorrowerFound, >- errTooManyEmailFound => $errTooManyEmailFound, > errAlreadyStartRecovery => $errAlreadyStartRecovery, >- errBadEmail => $errBadEmail, > errNoBorrowerEmail => $errNoBorrowerEmail, > errMultipleAccountsForEmail => $errMultipleAccountsForEmail, > errResetForbidden => $errResetForbidden, >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26941
:
113122
|
113303
|
114291
|
114543