Closed (fixed)
Project:
User Import
Version:
6.x-2.4
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 Nov 2010 at 00:48 UTC
Updated:
16 Dec 2010 at 00:20 UTC
I cannot for the life of me figure out how to specify roles for imported users via csv. This issue talks about specifying a column with comma separated values containing roles, but how the heck do you do that when the field separator for the whole file is a comma (CSV...)? I really have several questions:
1) how do you specify a role? is it with the role name, a role id number, or what?
2) how do you specify multiple roles for a user?
3) how do you specify roles that have a space in the name? Would you have to enclose them with quotes?
Here's an example of the sort of info I want to import. Any help would be much appreciated.
organization, first-name, last-name, phone-number, email, roles
Fun Town, Jane, Doe, 1234567890, jane@example.com, {User Administrator, Office Staff, Supervisor}
Comments
Comment #1
pvanerk commentedsubscribe
Comment #2
itserich commentedneed it also
Comment #3
robert castelo commentedIf you look at the sample.txt import file it looks like this:
"First Name","Last Name","Password","Tel","Fax","Email","Blog","Contact"
That's the format you should import with, you can then have a column that includes roles for a user, which if there's more than one should be comma separated: "role 1, role 2".
User Import even has the option to create roles if they don't exist.
Comment #4
timd.mackey commentedGreat, thanks for your help! I didn't realize that the fields were supposed to be enclosed with quotations, which is why I couldn't figure out how you could have multiple comma separated values in one field. All my tests so far had been with un-quoted fields.