tpac; honor password reset matching email setting
authorBill Erickson <berick@esilibrary.com>
Fri, 11 Nov 2011 20:25:49 +0000 (15:25 -0500)
committerMike Rylander <mrylander@gmail.com>
Tue, 15 Nov 2011 16:41:40 +0000 (11:41 -0500)
If the "circ.password_reset_request_requires_matching_email" org unit
setting is enable, prompt the user to enter the email address associated
with the account and subsequently pass it on to the password_reset api
call.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
Open-ILS/src/templates/opac/password_reset.tt2

index f14a200..fdbb3e3 100644 (file)
@@ -1738,6 +1738,7 @@ sub load_password_reset {
     } elsif ($barcode or $username) {
 
         my @params = $barcode ? ('barcode', $barcode) : ('username', $username);
+        push(@params, $email) if $email;
 
         $U->simplereq(
             'open-ils.actor', 
index b0533ac..144678e 100644 (file)
@@ -61,7 +61,9 @@
                     <td><input type="text" id="username" name="username"/></td>
                 </tr>
             </table>
-            <!--<label for="email">[% l('Email address associated with the account:') %] </label><input type="text" name="email"/></br>-->
+            [% IF ctx.get_org_setting(ctx.physical_loc || ctx.aou_tree.id, 'circ.password_reset_request_requires_matching_email') %]
+            <label for="email">[% l('Email address associated with the account:') %] </label><input type="text" name="email"/></br>
+            [% END %]
             <button name="submit" id="submitButton" type="submit">[% l('Submit') %]</button>
         </form>
         [% END %]