Title: [Plugin: Import Users from CSV] Questions
Last modified: August 20, 2016

---

# [Plugin: Import Users from CSV] Questions

 *  Resolved [raonip](https://wordpress.org/support/users/raonip/)
 * (@raonip)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-questions/)
 * Hi,
 * That’s great plugin!
 * How can I set the user role? whats the colunm name for that?
 * How can I Update de User? Where do I specify the colunm to find for the update
   key?
 * Thanks very much!
 * [http://wordpress.org/extend/plugins/import-users-from-csv/](http://wordpress.org/extend/plugins/import-users-from-csv/)

Viewing 14 replies - 1 through 14 (of 14 total)

 *  Plugin Contributor [Ulrich Sossou](https://wordpress.org/support/users/sorich87/)
 * (@sorich87)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-questions/#post-2102390)
 * > How can I set the user role? whats the colunm name for that?
 * The column name is ‘role’. Just put the role name (e.g. administrator, editor,
   contributor, and so on)
 * > How can I Update de User? Where do I specify the colunm to find for the update
   > key?
 * The column name is ‘ID’. Just put the ID of the existing user.
 *  Thread Starter [raonip](https://wordpress.org/support/users/raonip/)
 * (@raonip)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-questions/#post-2102395)
 * Hi! that’s great!! and quick answer!!
 * It is possible to Update the user by the user LOGIN?
    If the user login is already
   in WordPress the details is updated?
 * If not, is there a way I could change in the plugin?
 * Thanks very much!!!
 *  Plugin Contributor [Ulrich Sossou](https://wordpress.org/support/users/sorich87/)
 * (@sorich87)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-questions/#post-2102401)
 * > It is possible to Update the user by the user LOGIN?
   >  If the user login is 
   > already in WordPress the details is updated?
 * No, but I will definitely add that in the future version.
 * > If not, is there a way I could change in the plugin?
 * Yes. Find all references of $userdata[‘ID’] in the plugin file import-users-from-
   csv.php and replace them by $userdata[‘user_login’].
 *  Thread Starter [raonip](https://wordpress.org/support/users/raonip/)
 * (@raonip)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-questions/#post-2102402)
 * Owwww!!! That’s PERFECT!!!
 * Thanks very very much!!!!
 *  Plugin Contributor [Ulrich Sossou](https://wordpress.org/support/users/sorich87/)
 * (@sorich87)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-questions/#post-2102483)
 * After some reflexion, I decided not to include that feature in the plugin.
 * Here is a simple way to do that without modifying the plugin code: [http://pubpoet.com/2011/05/28/update-users-import-users-csv/](http://pubpoet.com/2011/05/28/update-users-import-users-csv/).
 * Let me know if you have other questions or features requests.
 *  Thread Starter [raonip](https://wordpress.org/support/users/raonip/)
 * (@raonip)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-questions/#post-2102543)
 * Hi! Thanks very much for that!
 * It is possible to have different header names in my CSV?
    If I change the names
   in the code below, it will work?
 *     ```
       $userdata_fields       = array(
       					'ID', 'user_login', 'user_pass',
       					'user_email', 'user_url', 'user_nicename',
       					'display_name', 'user_registered', 'first_name',
       					'last_name', 'nickname', 'description',
       					'rich_editing', 'comment_shortcuts', 'admin_color',
       					'use_ssl', 'show_admin_bar_front', 'show_admin_bar_admin',
       					'role'
       				);
       ```
   
 * Sometimes is not possible to have the CSV exported with this header names….would
   be great if we could change the names, even inside the code…….do you think is
   possible?
 * Thanks again!
 *  Thread Starter [raonip](https://wordpress.org/support/users/raonip/)
 * (@raonip)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-questions/#post-2102544)
 * hi, have a look at this plugin:
    [http://wordpress.org/extend/plugins/csv-user-import/](http://wordpress.org/extend/plugins/csv-user-import/)
 * It has a code that maps each column name to the user data……
 * I don’t know how to code that….just change somethings in PHP……maybe can help!!
 * Thanks again!!
 *  Plugin Contributor [Ulrich Sossou](https://wordpress.org/support/users/sorich87/)
 * (@sorich87)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-questions/#post-2102547)
 * Hi.
 * I am not sure I understand what you want, the plugin you link to doesn’t use 
   column names but positions.
 * Do you want to be able to use e.g. “First Name” instead of “first_name”?
 * If yes, you can do something like:
 *     ```
       add_filter( 'is_iu_import_userdata', 'example_filter_import_userdata', 10, 2 );
   
       function example_filter_import_userdata( $userdata, $usermeta ) {
       	if ( ! empty( $usermeta['First Name'] ) ) {
       		$userdata['first_name'] = $usermeta['First Name'];
       	}
   
       	return $userdata;
       }
       ```
   
 *  Thread Starter [raonip](https://wordpress.org/support/users/raonip/)
 * (@raonip)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-questions/#post-2102548)
 * Hi, that’s Exactly what I need!!!! Very nice!
 * I have to put this code in my functions file, right?
    If I want to change many
   colunm names I just copy and paste this part changing the names?
 *     ```
       if ( ! empty( $usermeta['First Name'] ) ) {
       		$userdata['first_name'] = $usermeta['First Name'];
       	}
       ```
   
 * I’m just confused…..I try to import a CSV other then your example and is not 
   working…..
    Maybe is because I’m made the CSV in MAcC OS X Editor? Can I send
   you the file? The CSV needs to be with “,” or can be “;”? Also needs to be enclosed
   by ” “??
 *  Thread Starter [raonip](https://wordpress.org/support/users/raonip/)
 * (@raonip)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-questions/#post-2102552)
 * Hi!
 * I have just tried and I could Import the CSV that I created in my Editor. Just
   have to turn UTF-8.
 * I tried your code below in my functions file and is not working….should I put
   anywhere else?
 *     ```
       add_filter( 'is_iu_import_userdata', 'example_filter_import_userdata', 10, 2 );
   
       function example_filter_import_userdata( $userdata, $usermeta ) {
       	if ( ! empty( $usermeta['First Name'] ) ) {
       		$userdata['first_name'] = $usermeta['First Name'];
       	}
   
       	return $userdata;
       }
       ```
   
 * I also changed in CSV file header from “first_name” to “First Name”…..
 * Any clue?
    Thanks again for all your support!
 *  Plugin Contributor [Ulrich Sossou](https://wordpress.org/support/users/sorich87/)
 * (@sorich87)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-questions/#post-2102597)
 * Strange. I just tried that and it works. Can you check again?
 *  [bazonline](https://wordpress.org/support/users/bazonline/)
 * (@bazonline)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-questions/#post-2102682)
 * > The column name is ‘ID’. Just put the ID of the existing user.
 * Hi Ulric, when I use the ID header, nothing gets imported, when I use user_id
   as a header, it does import the users but creates a different user id number 
   to the one I need.
 * Can you advise? I have to match these users to a bunch of posts that need to 
   be imported that have a “profileid” field that must match with the user id
 *  Plugin Contributor [Ulrich Sossou](https://wordpress.org/support/users/sorich87/)
 * (@sorich87)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-questions/#post-2102683)
 * [@bazonline](https://wordpress.org/support/users/bazonline/), try the latest 
   version (0.3.1) . And next time, please open a new thread. Old ones are easily
   overlooked.
 *  [bazonline](https://wordpress.org/support/users/bazonline/)
 * (@bazonline)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-questions/#post-2102684)
 * Thanks Ulrich, will get latest version- and thanks for replying on Christmas 
   day!

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘[Plugin: Import Users from CSV] Questions’ is closed to new replies.

 * ![](https://ps.w.org/import-users-from-csv/assets/icon-256x256.png?rev=2320381)
 * [Import Users from CSV](https://wordpress.org/plugins/import-users-from-csv/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/import-users-from-csv/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/import-users-from-csv/)
 * [Active Topics](https://wordpress.org/support/plugin/import-users-from-csv/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/import-users-from-csv/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/import-users-from-csv/reviews/)

 * 14 replies
 * 3 participants
 * Last reply from: [bazonline](https://wordpress.org/support/users/bazonline/)
 * Last activity: [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-import-users-from-csv-questions/#post-2102684)
 * Status: resolved