Importing contact needs the active flag set from old database.
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 7 Aug 2018 19:10:41 +0000 (15:10 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 7 Aug 2018 19:10:41 +0000 (15:10 -0400)
Need to look at the old active field and setup the new active flag the
same.

models/admin/management/contacts.php

index 4189a02..8b39c5e 100644 (file)
@@ -720,7 +720,7 @@ class GlmMembersAdmin_management_contacts extends GlmDataContacts
 
         // Get list of contacts from specified database table
         $sql = "
-            SELECT member_id, member_name, member_login, member_passwd, process_email,
+            SELECT active, member_id, member_name, member_login, member_passwd, process_email,
                    primary_contact, primary_contact_fname, primary_contact_lname
               FROM $schema.member
              WHERE member_login != '';
@@ -859,8 +859,8 @@ class GlmMembersAdmin_management_contacts extends GlmDataContacts
                         $this->wpdb->insert(
                             GLM_MEMBERS_CONTACTS_PLUGIN_DB_PREFIX . 'contacts',
                             array(
-                                'active'          => true,
-                                'primary_contact' => true,
+                                'active'          => $c['active'],
+                                'primary_contact' => $c['active'],
                                 'access'          => $this->config['access_numb']['NotDisplayedModerated'],
                                 'fname'           => $c['primary_contact_fname'],
                                 'lname'           => $c['primary_contact_lname'],