Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Can I bulk-add all users to a group?

  • frisket
  • frisket's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 5 days ago #134558 by frisket
Can I bulk-add all users to a group? was created by frisket
In the thread "Send email to LimeSurvey Users" the recommendation was to create a group and add all users to it, then email the group. ("Users" here means "people who create surveys", not respondents)

Creating the group is easy, but I see no way to add all my users to it: the "add user" facility in a group only lets you add them one by one, and I have dozens of them.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 5 days ago #134572 by holch
Replied by holch on topic Can I bulk-add all users to a group?
I think your only chance is to do it one by one. Usually you add people to a group when creating the user and in general the number of users of the LS backend is not soo elevated. Which is probably why there is no feature for bulk adding.

Maybe you can do something with the LS API, but with "only" dozens, you are maybe quicker adding them one by one than to find out if it is possible and add the respective API call. But I am no expert on this and I don't know if the API allows this.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
More
8 years 5 days ago #134574 by coeneisma
Replied by coeneisma on topic Can I bulk-add all users to a group?
Also not a API expert, but I got recently triggered by another subject about the Python API so I'm starting with it now and there is a Insert User method: api.limesurvey.org/classes/User.html#method_insertUser .

So, if you've got the coding skills and if you also have to add multiple users in the future, the API is probably the easiest way to go. Otherwise, like holch mentioned, manually adding the users.
The topic has been locked.
  • frisket
  • frisket's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 4 days ago #134582 by frisket
Replied by frisket on topic Can I bulk-add all users to a group?
Thanks for the responses. I found two ways which are much easier:
  1. (slow) Copy the whole User Control page and paste it into a file in /tmp, then
    Code:
    cat foo | tr '\040\011' '\012\012' | grep @
  2. (fast) Pull it from the database with
    Code:
    echo 'select email from lime_users' | mysql -X -u USR -pPSW dbname | lxprintf -e field "%s\n" . -
In both cases, snag the output and pipe it into your email recipients.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose