)
);
if ( !$memberTypeId ) {
- $this->wpdb->import(
+ $this->wpdb->insert(
GLM_MEMBERS_PLUGIN_DB_PREFIX . 'member_type',
array(
'name' => 'Default',
$short_descr .= ' ...';
}
+ // Setup the Member Profile Status
+ // Initial status if not being set
+ $profileStatus = $this->config['status_numb']['Active'];
+
+ if ( isset( $data['status'] ) ) {
+ switch ( strtolower( $data['status'] ) ) {
+ case 'active':
+ $profileStatus = $this->config['status_numb']['Active'];
+ break;
+ case 'pending review':
+ $profileStatus = $this->config['status_numb']['Pending Review'];
+ break;
+ case 'inactive':
+ $profileStatus = $this->config['status_numb']['Inactive'];
+ break;
+ case 'archived':
+ $profileStatus = $this->config['status_numb']['Archived'];
+ break;
+ default:
+ $profileStatus = $this->config['status_numb']['Active'];
+ break;
+ }
+ }
+
// Add the member info record
$insert = $this->wpdb->insert(
GLM_MEMBERS_PLUGIN_DB_PREFIX . 'member_info',
array(
'member' => $memberId,
'member_name' => $data['member_name'],
- 'status' => $this->config['status_numb']['Active'],
+ 'status' => $profileStatus,
'reference_name' => 'Imported Member Information',
'descr' => $data['descr'],
'short_descr' => $short_descr,