Title: Problem With New Users
Last modified: August 20, 2016

---

# Problem With New Users

 *  Resolved [diywebmastery](https://wordpress.org/support/users/diywebmastery/)
 * (@diywebmastery)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/problem-with-new-users/)
 * When I add a new user, the meta fields are not added to their profile. So if 
   I try to update a field it says it does not exist, and if I try to add it, it
   says it already exists.
 * I pressed the button to synch but that made no difference.
 * Am using 2.2.1
 * [http://wordpress.org/extend/plugins/user-meta-manager/](http://wordpress.org/extend/plugins/user-meta-manager/)

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/problem-with-new-users/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/problem-with-new-users/page/2/?output_format=md)

 *  Plugin Author [Jason Lau](https://wordpress.org/support/users/jason-lau/)
 * (@jason-lau)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/problem-with-new-users/#post-3556851)
 * Hi again. 🙂
 * So, just so I’m clear on this –
 * 1) You add a new member via Dashboard > Users > Add New
    2) You go to Dashboard
   > Edit Users > {the new user}
 * – and your custom meta profile fields are not there for the new user? Or, is 
   this not what you mean?
 * Did you select a “Field Type” for each Custom Meta field you created?
 *  Thread Starter [diywebmastery](https://wordpress.org/support/users/diywebmastery/)
 * (@diywebmastery)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/problem-with-new-users/#post-3556868)
 * Hi Jason
 * Thanks for coming back to me.
 * In wp_usermeta there is a record for each custom meta key for each user, including
   the new users. But the meta_value is blank for each. The user meta manager editor
   does not allow me to edit the blank values and it does not allow me to add them
   either.
 * So what I have had to do is go into the database manually, change the meta_value
   from blank to xxxxxx, and when I refresh the editor I am able to edit the xxxxxx
   away with the value I actually want.
 * I was on the latest version of the plugin up until today, but I reverted to the
   last version that worked consistently for me (which I am still on : 2.0.9) and
   the problem remained.
 * Here is a quick video to show you : [http://www.screencast.com/t/zFi62CxnJwXe](http://www.screencast.com/t/zFi62CxnJwXe)
 * Liz
 *  Plugin Author [Jason Lau](https://wordpress.org/support/users/jason-lau/)
 * (@jason-lau)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/problem-with-new-users/#post-3556871)
 * Thanks for the detailed explanation and video!
 * The plugin’s data structure changes between versions. Upgrading and downgrading
   probably will not return favorable results. The data from the newer version should
   be deleted before an older version is installed, or the saved data can become
   corrupted.
 * Your custom meta keys may have been deleted from the plugin’s saved data, or 
   the data structure doesn’t match the current version.
 * I haven’t been able to reproduce this issue yet. However, I will keep looking.
 *  Thread Starter [diywebmastery](https://wordpress.org/support/users/diywebmastery/)
 * (@diywebmastery)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/problem-with-new-users/#post-3556873)
 * Yes – I realise that (we are also plugin developers) – but given that the problem
   arose before I went back to the older version, I figured I didn’t have anything
   to lose!
 *  Thread Starter [diywebmastery](https://wordpress.org/support/users/diywebmastery/)
 * (@diywebmastery)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/problem-with-new-users/#post-3556874)
 * We can probably help with the fix? We can look at the code of the latest version
   and try to see what could be happening? One way would be to change the code to
   include allowing it to recognise and therefore edit blank values.
 *  Plugin Author [Jason Lau](https://wordpress.org/support/users/jason-lau/)
 * (@jason-lau)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/problem-with-new-users/#post-3556890)
 * > Yes – I realise that (we are also plugin developers)
 * I didn’t intend to insult your intelligence. 🙂
 * You will probably need to start from fresh because your saved data is corrupted
   somehow.
 * I reached this conclusion because on a clean install, I could not reproduce this
   bug.
 * Here were my steps –
    1. In User Meta Manager settings I set the option **Retain Saved Data On Uninstall:**
       to _No_
    2. Deactivated and deleted the old version.
    3. Installed the new version
    4. Created a new custom meta key with a blank default value.
    5. Added the test key to the Home table Columns.
    6. Added a new test user via the _User > Add New_ dialogue.
    7. Returned to User Meta Manager to edit the test key for the test user, using 
       the table actions.
 * The test worked without a glitch. The test meta key which had a blank default
   value was visible and editable in all screens. So, the plugin does recognized
   blank values.
 * Have you tested this on a clean install on a different website?
 *  Plugin Author [Jason Lau](https://wordpress.org/support/users/jason-lau/)
 * (@jason-lau)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/problem-with-new-users/#post-3556891)
 * If your data IS indeed corrupted, and you are unable to start from fresh, I can
   write a script to help you recover, if you want.
 *  Plugin Author [Jason Lau](https://wordpress.org/support/users/jason-lau/)
 * (@jason-lau)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/problem-with-new-users/#post-3556892)
 * I think what may have happened is, during an upgrade or downgrade, your custom
   keys were deleted from the plugin’s saved options. The custom meta keys still
   exist in the database, but do not exist in User Meta Manager’s saved data. So,
   when you attempt to recreate the key, it fails because the key DOES already exist
   in the database. And, when you attempt to edit the key, it fails because the 
   key is no longer in the plugin’s saved data.
 * The custom key exists in one area but not the other. It must exist in both database
   AND User Meta Manager saved data. The data is out of sync.
 * So what we need to do is copy the existing custom keys over to the new data structure,
   or delete the existing custom keys from the database and start fresh.
 * I hope that makes sense. 🙂
 *  Thread Starter [diywebmastery](https://wordpress.org/support/users/diywebmastery/)
 * (@diywebmastery)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/problem-with-new-users/#post-3556894)
 * Jason – sorry I did not for a moment think you were insulting my intelligence.
   Not sure how much of that I have at 3:30am when I last wrote to you anyway!
 * I will do as you suggest. The corruption could have occurred when I went back
   to an older version about a month ago after an upgrade that didn’t work. I was
   aware it might cause an issue but with so few records I was willing to do it.
 * You fixed the problem at the time and I was able to re-upgrade. Then I didn’t
   get a new user into my membership site until now, and have only just discovered
   the problem. That might explain it.
 * I’ll do that today and let you know how it goes.
 *  Thread Starter [diywebmastery](https://wordpress.org/support/users/diywebmastery/)
 * (@diywebmastery)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/problem-with-new-users/#post-3556895)
 * All that key info you just described makes perfect sense. We’re doing the data
   manipulations now.
 *  Plugin Author [Jason Lau](https://wordpress.org/support/users/jason-lau/)
 * (@jason-lau)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/problem-with-new-users/#post-3556898)
 * Actually, I have a solution that might work easily.
 * Open wp-content/plugins/user-meta-manager/user-meta-manager.php
 * Find on line 1390
    `if($meta_key_exists && $_POST['mode'] == 'add'):`
 * Replace with
 *     ```
       //if($meta_key_exists && $_POST['mode'] == 'add'):
       if($_POST['mode'] == 'add'):
       ```
   
 * Save.
 * Then go add the missing custom meta keys.
    That SHOULD override the check which
   stops the process if the meta key already exists.
 * Backup your data first though!
 *  Plugin Author [Jason Lau](https://wordpress.org/support/users/jason-lau/)
 * (@jason-lau)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/problem-with-new-users/#post-3556899)
 * Wait, I did that wrong.
    Replace
 *     ```
       if($meta_key_exists && $_POST['mode'] == 'add'):
                  // Key already exists
                  $output = '<span class="umm-error-message">' . __('Error: Meta key already existed. Choose a different name.', UMM_SLUG) . '</span>';
               else: // Key doesn't exist
       ```
   
 * With
    `if($_POST['mode'] == 'add'):`
 *  Plugin Author [Jason Lau](https://wordpress.org/support/users/jason-lau/)
 * (@jason-lau)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/problem-with-new-users/#post-3556961)
 * Hi Liz, Did we resolve this issue?
 *  Thread Starter [diywebmastery](https://wordpress.org/support/users/diywebmastery/)
 * (@diywebmastery)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/problem-with-new-users/#post-3556962)
 * No Jason. I want to get some time to re-visit this today. I could not see how
   to uninstall the plugin so as to wipe all data clean. Some was left behind and
   we couldn’t find it. I wanted to do a clean install …
 *  Plugin Author [Jason Lau](https://wordpress.org/support/users/jason-lau/)
 * (@jason-lau)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/problem-with-new-users/#post-3556963)
 *     ```
       <?php
   
       require('wp-load.php');
   
       $delete_meta_keys = array('key1', 'key2'); // Array of meta keys to delete
   
       global $wpdb, $user_ID, $table_prefix;
   
       if ('' == $user_ID){
          wp_die("Login first!");
       }
   
       foreach($delete_meta_keys as $meta_key){
           $query = "SELECT * FROM ".$wpdb->users;
           $data = $wpdb->get_results($query);
           foreach($data as $user){
               delete_user_meta($user->ID, $meta_key);
           }
       }
       delete_option('umm_singles_data');
       delete_option('user_meta_manager_data');
       delete_option('umm_users_columns');
       delete_option('umm_usermeta_columns');
       delete_option('umm_backup_date');
       delete_option('umm_backup_files');
       delete_option('umm_profile_fields');
       delete_option('umm_settings');
       delete_option('umm_sort_order');
       $wpdb->query("DROP TABLE IF EXISTS " . $table_prefix . "umm_usermeta_backup");
   
       print('Action completed.');
   
       ?>
       ```
   
 * Edit the **$delete_meta_keys** variable to suit your needs and run the script
   from the root WP directory. That will remove any meta keys you listed in the **
   $delete_meta_keys** variable, and any data associated with _User Meta Manager_.

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/problem-with-new-users/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/problem-with-new-users/page/2/?output_format=md)

The topic ‘Problem With New Users’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/user-meta-manager.svg)
 * [User Meta Manager](https://wordpress.org/plugins/user-meta-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/user-meta-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/user-meta-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/user-meta-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/user-meta-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/user-meta-manager/reviews/)

 * 16 replies
 * 2 participants
 * Last reply from: [Jason Lau](https://wordpress.org/support/users/jason-lau/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/problem-with-new-users/page/2/#post-3556964)
 * Status: resolved