Bug 18956: Fix empty to in message queue
authorMark Tompsett <mtompset@hotmail.com>
Wed, 13 Sep 2017 03:44:19 +0000 (03:44 +0000)
committerKatrin Fischer <katrin.fischer.83@web.de>
Sun, 22 Oct 2017 21:41:56 +0000 (21:41 +0000)
Follow the test plan in comment #20.
Also tweaked string, because it was really 'or' before too.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended text in added comment.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt
opac/opac-password-recovery.pl

index b16a33b..5c13952 100644 (file)
@@ -86,7 +86,7 @@
                     <form action="/cgi-bin/koha/opac-password-recovery.pl" method="post" autocomplete="off">
                         <input type="hidden" name="koha_login_context" value="opac" />
                         <fieldset>
-                            <p>To reset your password, enter your login and your email address.
+                            <p>To reset your password, enter your login or your email address.
                             <label for="username">Login:</label>
                             <input type="text" id="username" size="40" name="username" value="[% username %]" />
                             <label for="email">Email:</label>
index 6ffd57c..d06607f 100755 (executable)
@@ -107,6 +107,10 @@ if ( $query->param('sendEmail') || $query->param('resendEmail') ) {
                 DeleteExpiredPasswordRecovery( $borrower->borrowernumber );
             }
         }
+        # Set the $email, if we don't have one.
+        if ( !$hasError && !$email ) {
+            $email = $firstNonEmptyEmail;
+        }
     }
     else {    # 0 matching borrower
         $hasError           = 1;