Import users

Support
2012-03-16
2013-03-22
  • Andrea Taroni

    Andrea Taroni - 2012-03-16

    Hi,
    I have 2 thousand people (users) to add.. is there a way to import users from a text file or a query?
    How can I do to move users from my old dms?

     
  • Andrea Taroni

    Andrea Taroni - 2012-04-03

    Thanks to Eric that sent me a php file that do the trick!
    I have found a good way to insert people into group: I have created a csv file with columns userid and groupid and inserted it in the table auth.grouplink.

     
  • Eric Lawman

    Eric Lawman - 2012-04-03

    When the next release is pushed out, I'll be sure to include that script and the sample csv file in the scripts/ directory for anyone else that wants it.

    E

     
  • Andrea Taroni

    Andrea Taroni - 2012-07-18

    The script must be placed in docmgr root folder before baing launched, with syntax php accountinsert.php, and the csv file must be there too.
    To assign users to the correct group you can do a csv file groups.csv with columns accountid, groupid and import them with this command line:
    cat groups.csv | psql <DataBaseName> -c "COPY auth.grouplink(accountid,groupid) FROM STDIN WITH CSV HEADER;"
    Thanks again to Eric for the suggest.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks