Bug 43245: Redirect user if no email was provided

TO TEST:
0 - Apply patch
1 - Make sure OPACResetPassword is activated
2 - Go to that good old Henry Acevedo's page and reset their password
3 - Notice you have been redirected with an error message telling you
have no email

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
Baptiste Wojtkowski 2026-08-07 09:56:07 +00:00 committed by Pedro Amorim
parent 1a5be8e287
commit 3d41c25c08
No known key found for this signature in database
GPG Key ID: 06B75BA7F3894D55
2 changed files with 7 additions and 0 deletions

View File

@ -83,6 +83,10 @@
<h3>Unable to renew patron</h3>
<p>They must have a guarantor</p>
[% END %]
[% IF ( error == 'NO_EMAIL_FOR_RECOVERY' ) %]
<h3>Unable to send recovery email</h3>
<p>No email address provided</p>
[% END %]
</div>
[% END %]

View File

@ -131,6 +131,9 @@ if ( $op eq 'send_password_reset' ) {
# send staff initiated password recovery
SendPasswordRecoveryEmail( $patron, $emailaddr, 1 );
} else {
print $input->redirect(
"/cgi-bin/koha/members/moremember.pl?borrowernumber=$borrowernumber&error=NO_EMAIL_FOR_RECOVERY");
}
# redirect to self to avoid form submission on refresh