Bugzilla – Attachment 117933 Details for
Bug 27860
Bad KohaAdminEmailAddress breaks patron self registration and password reset feature
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27860: Fix password recovery
Bug-27860-Fix-password-recovery.patch (text/plain), 2.10 KB, created by
Martin Renvoize (ashimema)
on 2021-03-08 16:01:43 UTC
(
hide
)
Description:
Bug 27860: Fix password recovery
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-03-08 16:01:43 UTC
Size:
2.10 KB
patch
obsolete
>From 7b54d29b29b760f7b076f5fb6ea8bc3145e54d01 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 5 Mar 2021 10:14:08 +0100 >Subject: [PATCH] Bug 27860: Fix password recovery > >Same as the previous patch but for the password recovery feature. > >Test plan: >1. Do not apply the patches >2. Set KohaAdminEmailAddress to an invalid email (root@localhost for >instance) >3. Use the password recovery feature >5. Boom (that must be fixed on a separate bug report) >6. Set KohaAdminEmailAddress to a valid email (root@example.org) >7. Use again the password recovery for a different user >8. Still Boom! (because it's processing the first invalid email) >9. Apply the patches, restart_all >10. Try again the password recovery >=> The email is sent! >Notice the change in DB, the first email is still there with status >"pending" and second email is sent! > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Patron/Password/Recovery.pm | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > >diff --git a/Koha/Patron/Password/Recovery.pm b/Koha/Patron/Password/Recovery.pm >index 664035481d..c2e2d27930 100644 >--- a/Koha/Patron/Password/Recovery.pm >+++ b/Koha/Patron/Password/Recovery.pm >@@ -153,7 +153,7 @@ sub SendPasswordRecoveryEmail { > my $library = $borrower->library; > my $kohaEmail = $library->branchemail || C4::Context->preference('KohaAdminEmailAddress'); # send from patron's branch or Koha Admin > >- C4::Letters::EnqueueLetter( >+ my $message_id = C4::Letters::EnqueueLetter( > { > letter => $letter, > borrowernumber => $borrower->borrowernumber, >@@ -162,10 +162,10 @@ sub SendPasswordRecoveryEmail { > message_transport_type => 'email', > } > ); >- my $num_letters_attempted = C4::Letters::SendQueuedMessages( { >- borrowernumber => $borrower->borrowernumber, >- letter_code => 'PASSWORD_RESET' >- } ); >+ >+ my $num_letters_attempted = >+ C4::Letters::SendQueuedMessages( { message_id => $message_id } ); >+ > return ($num_letters_attempted > 0); > } > >-- >2.20.1
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 27860
:
117796
|
117797
|
117798
|
117931
|
117932
|
117933
|
118201
|
118202
|
118203