Title: modifications updating wrong users
Last modified: August 22, 2016

---

# modifications updating wrong users

 *  [joetomgo](https://wordpress.org/support/users/joetomgo/)
 * (@joetomgo)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/modifications-updating-wrong-users/)
 * Using CIMY to add and update users to WP sites.
 * I am using a subscription ID as the username for new imports (and modifications).
   This was at the request of the client.
 * Let’s use the example that we are adding a new user with username “750”.
 * What I am finding is that sometimes (have not determined if it is everytime) 
   if the USERID matches the numeric USERNAME, the cimy import actually updates 
   the the record instead of adding a new record. So in my example the user with
   USERID 750 would be updated in applicable fields with “USERNAME 750” data…..and
   USERNAME 750 is never added to the Wp user database.
 * Is this a know issue?
 * [https://wordpress.org/plugins/cimy-user-manager/](https://wordpress.org/plugins/cimy-user-manager/)

Viewing 1 replies (of 1 total)

 *  [zigsp8](https://wordpress.org/support/users/zigsp8/)
 * (@zigsp8)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/modifications-updating-wrong-users/#post-5630079)
 * The problem occurs due to using a username that converts to a numeric. (ie usernames
   like ‘4465’). If a user with a username of 4465 doesnt exist but a user with 
   ID of 4465 does exists, WP_User returns the user with that ID instead.
 * To fix this, I modified the cimy_user_manager.php On line 592 need to call WP_user
   with a zero as the $id parameter.
 * In other words, change:
    `$wp_user = new WP_User($username);`
 * to:
    `$wp_user = new WP_User(0,$username);`
 * specifically sending the username to WP_User() in the $name parameter.

Viewing 1 replies (of 1 total)

The topic ‘modifications updating wrong users’ is closed to new replies.

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

 * 1 reply
 * 2 participants
 * Last reply from: [zigsp8](https://wordpress.org/support/users/zigsp8/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/modifications-updating-wrong-users/#post-5630079)
 * Status: not resolved