From 41baff41be27f0df19234232a0bffea69c323009 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Tue, 7 May 2019 12:02:22 -0400 Subject: [PATCH] RT# 82132 - updated password reset by mail to use username-uppercase config Conflicts: FS/FS/ClientAPI/MyAccount.pm --- FS/FS/ClientAPI/MyAccount.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm index dae2e1929..470d12b11 100644 --- a/FS/FS/ClientAPI/MyAccount.pm +++ b/FS/FS/ClientAPI/MyAccount.pm @@ -3130,7 +3130,11 @@ sub reset_passwd { my $cust_main = ''; if ( $p->{'email'} ) { #new-style, changes contact and svc_acct - $contact = FS::contact->by_selfservice_email($p->{'email'}); + $contact = FS::contact->by_selfservice_email($p->{'email'}, 'case_insensitive'); + + if ($conf->exists('username-uppercase') || $conf->exists('username-uppercase', $contact->cust_main->agentnum)) { + $contact = FS::contact->by_selfservice_email_custnum($p->{email}, $contact->custnum); + } $cust_main = $contact->cust_main if $contact; -- 2.11.0