Import Security/Members by csv

silverstripe-4
Tags: #<Tag:0x00007f10c75ddfc0>

#1

4.3

How to add a group to members imported by csv?

On https://docs.silverstripe.org/en/4/developer_guides/integration/csv_import/ it says “By the way, you can import Member and Group data through http://localhost/admin/security interface out of the box.” I could not get it working. I tried a column called “group” or “groups”, with the ID or the groups name. Thanks for your help


#2

This is a little bit unintuitive. The CMS tells you to use the Group’s code:

41%20am

But you can’t see the code in the CMS. You can find it on the Groups table in the database.

00%20am

So with a column named ‘Groups’ a value like ‘content-authors,your-group-name’ should work.