043017af13
SendPasswordRecoveryEmail relies on the calling script to tell if there is an existing valid recovery already. If there's an expired recovery-entry the members/notices.pl script will try to create a new entry resulting in a duplicate key error. This patch fixes the bug by removing the need for the calling script to do the check as since SendPasswordRecoveryEmail does the same thing anyway. SendPasswordRecoveryEmail will now use DBIx ->update_or_create instead of looking at the $update param to determine if it should update an existing entry or create a new. The update param is removed from all calling scripts and test are updated. To test: 1. Generate a password recovery mail for a patron 2. Let it expire. 3. Generate a new password recovery from staff to the same patron - Fail! 4: Apply patch 5. Generate a new password recovery from staff to the same patron - Success! 6. Opac password recovery flow should also work. 7. Tests pass. Sponsored-by: Lund University Library Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> |
||
---|---|---|
.. | ||
accountline-details.pl | ||
apikeys.pl | ||
boraccount.pl | ||
cancel-charge.pl | ||
default_messageprefs.pl | ||
deletemem.pl | ||
discharge.pl | ||
discharges.pl | ||
files.pl | ||
holdshistory.pl | ||
housebound.pl | ||
ill-requests.pl | ||
mancredit.pl | ||
maninvoice.pl | ||
member-flags.pl | ||
member-password.pl | ||
member.pl | ||
memberentry.pl | ||
members-home.pl | ||
members-update-do.pl | ||
members-update.pl | ||
merge-patrons.pl | ||
mod_debarment.pl | ||
moremember.pl | ||
notices.pl | ||
patronimage.pl | ||
pay.pl | ||
paycollect.pl | ||
print_overdues.pl | ||
printfeercpt.pl | ||
printinvoice.pl | ||
printnotice.pl | ||
printslip.pl | ||
purchase-suggestions.pl | ||
readingrec.pl | ||
recallshistory.pl | ||
routing-lists.pl | ||
search.pl | ||
setstatus.pl | ||
statistics.pl | ||
summary-print.pl | ||
two_factor_auth.pl | ||
update-child.pl |