Support » Plugin: Import Users from CSV » [Plugin: Import Users from CSV] Importing new/existing users from another system

  • Resolved joehanna



    Thank for you creating a great plugin – for free!

    My client’s business uses a CRM system that employees use in their office. They would like to synchronise their members’ accounts from the CRM with their WP 3.4.2 website – with all members having a Subscriber role.

    The plan is to export member records from the CRM system to a CSV and hopefully use your plugin to import the records into the WP website. The CSV file can contain both new and existing users with updated fields.


    1. Updating existing users requires an “ID” field in the file. We would like to use the “ID” field from their CRM for new records however, if it is a new record for WP and an “ID” is supplied, the plugin expects to update a record – not try to import one and so nothing happens. We need to have a consistent file structure so the export can be automated.

    2. We would like to be able to import the file using a carefully crafted URL if possible so it can be done automatically via a script on a schedule.

    Can you help with these two problems?

    Thanks in advance

Viewing 4 replies - 1 through 4 (of 4 total)
  • If you are importing from another wordpress database, why are you taking the extra step of converting to csv? Why not just clone the table?

    Hi cynnie88,

    I am not import from another WordPress database. It is a CRM system provided by a third party used in the client’s office.


    Ok I completely misunderstood.

    Plugin Author Ulrich Sossou


    You will need to write some code for that. Fortunately, the plugin is sufficiently flexible, so there isn’t much to write.

    For problem 1, store the ID from the CRM system in user meta. Then filter out during plugin import to match with WordPress ID. Something like:

    function custom_match_ids( $userdata, $usermeta ) {
        $users = get_users( array(
            'meta_key' => 'crm_id', // supposing the CRM ID is stored in crm_id field
            'meta_value' =>$usermeta['crm_id']
        ) );
        if ( $users )
            $userdata['ID'] = $users[0]->ID;
        return $userdata;
    add_filter( 'is_iu_import_userdata', 'custom_match_ids', 10, 2 );

    For problem 2, see

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Import Users from CSV] Importing new/existing users from another system’ is closed to new replies.