ungleich-tools/matrix/create_user
2020-12-31 10:18:26 +01:00

11 lines
No EOL
415 B
Text

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>'
curl -v -X PUT -H "$h" -d "$data" http://localhost:8008/_synapse/admin/v2/users/$id:<matrix domain>
sleep 2
done < info.txt