Fixed dropping of categories when just adding a member profile
authorChuck Scott <cscott@gaslightmedia.com>
Tue, 24 May 2016 20:40:34 +0000 (16:40 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Tue, 24 May 2016 20:40:34 +0000 (16:40 -0400)
models/admin/member/memberInfo.php

index d23b73f..32c5587 100644 (file)
@@ -338,12 +338,6 @@ class GlmMembersAdmin_member_memberInfo extends GlmDataMemberInfo
             // Add the new member information record
             case 'addNew':
 
-                // Check for new cities being submitted
-                $this->checkNewCities();
-
-                // Update submitted categories
-                $this->updateCategories();
-
                 // Insert the new member info into the database
                 $this->memberName = $this->memberData['name'];
                 $this->memberInfo = $this->insertEntry();
@@ -363,9 +357,17 @@ class GlmMembersAdmin_member_memberInfo extends GlmDataMemberInfo
                     ;";
                     $this->wpdb->query($sql);
 
+                    // Check for new cities being submitted
+                    $this->checkNewCities();
+
+                    // Update submitted categories
+                    $this->updateCategories();
+
                     $this->memberInfo = $this->editEntry($this->memberInfoID);
+
                 }
 
+
                 break;
 
             // Clone the member information record.