WordPress.org

Ready to get started?Download WordPress

Forums

Import Users from CSV
[resolved] User Meta not importing (2 posts)

  1. plugins_lexblog
    Member
    Posted 1 year ago #

    Hey Ulrich,

    I found that user meta fields were not importing when importing new users. I did some debugging, which you can see is commented out below (near line 300).

    Basically, it looks like the plugin was passing a value of "1" for $user_id below. In my second debug string, it was actually passing the proper ID number for the new user:

    if ( $usermeta ) {
    //wp_die('test');
    foreach ( $usermeta as $metakey => $metavalue ) {
    $metavalue = maybe_unserialize( $metavalue );
    update_user_meta( $user_id, $metakey, $metavalue );
    //wp_die('id: '.$user->ID.', metakey: '.$metakey.', metavalue: '.$metavalue);
    }
    }

    However, as a quick fix, I simply added the meta fields I needed to your predefined array at line 195.

    Would you consider addressing this in an update?

    http://wordpress.org/extend/plugins/import-users-from-csv/

  2. Ulrich Sossou
    Member
    Plugin Author

    Posted 1 year ago #

    OK. I will look into it. Thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.