- Posts: 50
- Thank you received: 1
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
- Topic Author
- Offline
- Senior Member
Less
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.
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11637
- Thank you received: 2737
8 years 5 days ago #134572
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
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.
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.
- coeneisma
- Offline
- Senior Member
Less
More
- Posts: 74
- Thank you received: 26
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.
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
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 50
- Thank you received: 1
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:
- (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 @
- (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" . -
The topic has been locked.