Enhancement for Multisite User Meta Import
-
Hello Javier,
I have been using your plugin successfully for a few years in a multisite environment. I was wondering if you would consider an enhancement for importing the Extra Profile fields that are stored in user meta. WordPress uses the functions insert_user_meta and add_user_meta to store the user meta values in the {wp_prefix}usermeta table. This is also available globally for a particular user across all sites in a multisite installation.
In order to have user meta Extra Profile fileds accessible only to a single site in a multisite installation, the function update_user_option is used to save the user meta. The WordPress function automatically prepends the multisite table prefix to the option name. The WordPress functions to retrieve the user meta such as get_user_option recognizes the prefix and only loads the user meta on the desired site. Thus if a user is imported on a particular site, the Extra Profile fields are only available on that site.
Would it be possible to provide a checkbox on the import setup to determine if the Extra Profile fileds user meta should be imported as globally available or on a per site basis? This could be added as a checkbox under the Update Users section of the Import tab, or as checkboxes next to each field on the Extra Profile Fields tab. The selection would determine if the user meta.
Another method might be to include and optional row on the import table that defined how an extra profile field is handled. Below is a sample CSV pasted showing the optional 1st row with global and site annotations.
global,global,global,global,global,global,site,site Username,Email,display_name,first_name,last_name,mobile,allposts,corecrew johnsmith,[email protected],Sailor,John,Smith,4015551212, yes, yes
Thanks for your consideration. This is a great plugin!
- The topic ‘Enhancement for Multisite User Meta Import’ is closed to new replies.