Mautic Community Forums

Unable to update user role

Hi,

I am unable to update a user role by using Mautic Api. The following is the code that i had tried .



$id = 1;

$data = array(

‘lastName’ => ‘Doeboe’,

‘role’ => 2

);



$user = $userApi->edit($id, $data);

Hi,
I am unable to update a user role by using Mautic Api. The following is the code that i had tried .

$id = 1;
$data = array(
‘lastName’ => ‘Doeboe’,
‘role’ => 2
);

$user = $userApi->edit($id, $data);