[Lizmap] hundred's of users creation script

Lionel Bargeot lionel.bargeot at gmail.com
Thu Jun 10 00:23:13 PDT 2021


Hi all

In a scientific project we will use Lizmap to get informations about 
hundreds of farms.

We need to

- create hundred's of accounts (login, password, email)

- use "filters by group" and so create hundred's of groups and put each 
new user in it's own group.

I've allready identifyed a good way to create users with this command line :

php lizmap/scripts/script.php jcommunity~user:create -v 
--no-error-if-exists myuser user at mail.org secretpassword

I have also seen this post 
https://github.com/3liz/lizmap-web-client/issues/836 but it's not enough 
for group creating (or I missed somthing).

If i want to create myusergroup perhap's the best way is to inject sql 
queryes in jauth.db

INSERT INTO jacl2_group VALUES('myusergroup','mygroup',1,NULL); (obtain 
with making a dump of the table)

INSERT INTO jacl2_user_group VALUES('myuser','myusergroup');

Do you know if it's enough ? I asked myself particularly about 
jacl2_rights  and jacl2_subject.

Thanks for all

Regards

Lionel





More information about the Lizmap mailing list