I follow this answer How to create user with role(s) through REST service?
{"name":"user343","pass":"kes35@r4","mail":"[email protected]","status":"1", "roles":["4"]}
But When I check the created user, It role still is '2' (authenticated user)
I follow this answer How to create user with role(s) through REST service?
{"name":"user343","pass":"kes35@r4","mail":"[email protected]","status":"1", "roles":["4"]}
But When I check the created user, It role still is '2' (authenticated user)
Just install Auto Assign Role
Module.
Then use this following json code:
{"name":"user3431","pass":"kes35@r4","mail":"[email protected]","status":"1", "user_roles":{"6"}}
Same issue occured with me. I used rules module to assign a role on user account creation based on certain field data.Hope it helps