Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I am having difficulty setting a user role when creating a user. It fails saying it's the incorrect format. I've tried arrays, strings, integers and nested arrays.
Comments
Comment #1
Neograph734Does this only occur on user creation, or also on updating existing users? If it is only on creation I have no idea, otherwise you might try to set an array of roles keyed by role id. Like this:
That should work.
Comment #2
nicxvan CreditAttribution: nicxvan commentedI haven't tested on update. I ended up creating a rule that assigned the role.