Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Bulk Import of Users

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

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

Page: 1
Go to End
Author Topic: 3662 Views
  • artlung
    Avatar
    Community Member
    10 Posts

    Bulk Import of Users Link to this post

    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?

  • banal
    Avatar
    Community Member
    901 Posts

    Re: Bulk Import of Users Link to this post

    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

  • erwanpia
    Avatar
    Community Member
    63 Posts

    Re: Bulk Import of Users Link to this post

    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.

    3662 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.