Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Bulk Import of Users


Go to End


3 Posts   4425 Views

Avatar
artlung

Community Member, 10 Posts

9 October 2008 at 1:01pm

Is there a tool to Bulk load users into the Users and User_Groups tables?

Ideally I'd like to upload a csv file containing FirstName, Surname, Email, Password and have the users added if they are not in the user database already, and add them to whatever group I specify.

Nice to have would be making Password optional and auto-generating passwords.

Anyone build anything like this? Or have thoughts on how to go about building it as an add-on?

Avatar
bummzack

Community Member, 904 Posts

9 October 2008 at 8:31pm

There's a csv import for the newsletter mailing list. Maybe you can simply alter that code and use it for your user import. I guess there shouldn't be too much to change, since the newsletter subscribers are basically users as well

Avatar
erwanpia

Community Member, 63 Posts

25 November 2008 at 4:43am

Edited: 25/11/2008 4:44am

Hi, you will find in the attached files my own implentation of bulk users import, directly duplicated from the code in newsletter ( screenshot here )

place the following in cms/code
SecurityAdmin.php (replace)
SecurityImportField.php (new)

and place the following in cms/templates (both new)
Security_RecipientImportField.ss
Security_RecipientImportField_Table.ss

tested on 2.2.3

don't know yet if it can import password too, to be tested, let me know how it goes for you

[edit] : do attached files work on this forum ? if not download here.