[freeside-commits] branch master updated. 8410cdd0df8c470b0d804be5e03539303f2a8079

Ivan ivan at 420.am
Tue Mar 21 14:12:38 PDT 2017


The branch, master has been updated
       via  8410cdd0df8c470b0d804be5e03539303f2a8079 (commit)
      from  b391b1ce982eb659dcba167dc1c3a883dd437325 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 8410cdd0df8c470b0d804be5e03539303f2a8079
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Mar 21 14:12:37 2017 -0700

    fix self-service contact logins, RT#74798

diff --git a/FS/FS/contact.pm b/FS/FS/contact.pm
index c462e55..a873fda 100644
--- a/FS/FS/contact.pm
+++ b/FS/FS/contact.pm
@@ -766,8 +766,13 @@ sub by_selfservice_email {
     'table'     => 'contact_email',
     'addl_from' => ' LEFT JOIN contact USING ( contactnum ) ',
     'hashref'   => { 'emailaddress' => $email, },
-    'extra_sql' => " AND ( contact.disabled IS NULL ) ".
-                   " AND ( contact.selfservice_access = 'Y' )",
+    'extra_sql' => "
+      AND ( contact.disabled IS NULL )
+      AND EXISTS ( SELECT 1 FROM cust_contact
+                     WHERE contact.contactnum = cust_contact.contactnum
+                       AND cust_contact.selfservice_access = 'Y'
+                 )
+    ",
   }) or return '';
 
   $contact_email->contact;

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/contact.pm |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list