ungleich-tools/matrix/create_user

11 lines
415 B
Text
Raw Normal View History

2020-12-31 09:17:24 +00:00
while read A B C D E
do
pw=$E
name=$A" "$B
ad=$C
id="@"$D
data='{"password":"'${pw}'", "displayname": "'${name}'", "threepids": [ { "medium": "email", "address": "'${ad}'" }], "admin": false, "deactivated": false, "avatar_url": null }'
h='Authorization: Bearer <AccessToken>'
2020-12-31 09:18:26 +00:00
curl -v -X PUT -H "$h" -d "$data" http://localhost:8008/_synapse/admin/v2/users/$id:<matrix domain>
2020-12-31 09:17:24 +00:00
sleep 2
done < info.txt