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:
parent
1a5be8e287
commit
3d41c25c08
|
|
@ -83,6 +83,10 @@
|
||||||
<h3>Unable to renew patron</h3>
|
<h3>Unable to renew patron</h3>
|
||||||
<p>They must have a guarantor</p>
|
<p>They must have a guarantor</p>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
[% IF ( error == 'NO_EMAIL_FOR_RECOVERY' ) %]
|
||||||
|
<h3>Unable to send recovery email</h3>
|
||||||
|
<p>No email address provided</p>
|
||||||
|
[% END %]
|
||||||
</div>
|
</div>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,9 @@ if ( $op eq 'send_password_reset' ) {
|
||||||
|
|
||||||
# send staff initiated password recovery
|
# send staff initiated password recovery
|
||||||
SendPasswordRecoveryEmail( $patron, $emailaddr, 1 );
|
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
|
# redirect to self to avoid form submission on refresh
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue