• Hello.

    I’m trying to import Users from a spreadsheet to a site where I have multiple custom User Roles.

    I’ve created a new Importer and used the User template. In User Role field, I’ve had to activate the “Enable Text Field” as the User Roles will vary from user to user, so it will be according to my spreadsheet.

    I’ve imported and tested but the User is imported without the User Role. I’ve checked and the text in my spreadsheet is equal to the User Role name.

    I’m using User Role Editor as I need multiple User Roles in this site.

    So, any toghts what could be wrong? Is your plugin able to import User Roles with the text field? Would it be compatible with custom user roles created by other plugins?

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author jcollings

    (@jcollings)

    Hi Rafaelzrt

    Sorry i have only just noticed this ticket.

    I have been able to replicate your problem, at the moment the importer only expects a single user role as that is the default functionality, which by the looks of it that plugin changes.

    I will have a look and see what can be done to make it work with User Role Editor plugin.

    James

    Thread Starter rafaelzrt

    (@rafaelzrt)

    Hello James.

    I’ve managed to solve my problem in the last days.

    I’ve used the Field Map option to filter the several User Roles as it is in my spreadsheet to return the slug of the User Role. Returning the slug, the User was created with the proper User Role I needed.

    I guess it is solved then. Thank you!

    Thread Starter rafaelzrt

    (@rafaelzrt)

    Hello again James,

    was there any progress making it possible to import multiple user roles?

    I managed to import my custom user role but I couldn’t make it work to add more than one user role for a user.

    Thank you.

    Plugin Author jcollings

    (@jcollings)

    Hi Rafaelzrt,

    I had not progressed with this since you had previously solved your own issue, i have had a look into this and can see that this user role plugin and it seems you can import this by enabling the role field, setting this to the main user role.

    Then under the custom fields section, add a new custom field “wp_capabilities” , with the field type “serialized”, under the serialized values add a row per user role setting the key to the role name (e.g. subscriber or contributor) and the value of 1

    Once imported this should show as the secondary roles.

    James

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

You must be logged in to reply to this topic.