I have a headless Drupal and I'm trying to figure out how to auto assign a role during registration based off of a custom field (field_is_student) in the registration form.
I am trying to use Rules but I don't know how to access the field to check whether it's true or false. My rule is set to "After saving a new user (rules_entity_insert:user)" and the only options I get in the condition Data Selector are are User based.
Here's what I'm using to create my users:
{
"name": {
"value": "username"
},
"mail": {
"value": "[email protected]"
},
"field_is_student":{
"value": false
}
}