Api user/create with _customfields fails
Posted: Thu Aug 11, 2022 8:08 pm
Hello, I am using the api to create users and I have problems with the _customfields
It does not recognize these values when creating the user
I do it this way:
$testApiCall = new SimpleXMLElement(FormaLMS::call('user/create', array(
'auth'=>$tokenforma,
'userid' => ‘user1’,
'firstname' => 'firstuser',
'lastname' => ‘userlast’,
'password' => 'prueba1',
'email' => ‘[email protected]’,
'role' => "user",
'valid' => 1,
'force_change' => 0,
'_customfields' => [
5 => 'customfield5' ,
16 => ‘customfield16’
]
)));
It does not recognize these values when creating the user
I do it this way:
$testApiCall = new SimpleXMLElement(FormaLMS::call('user/create', array(
'auth'=>$tokenforma,
'userid' => ‘user1’,
'firstname' => 'firstuser',
'lastname' => ‘userlast’,
'password' => 'prueba1',
'email' => ‘[email protected]’,
'role' => "user",
'valid' => 1,
'force_change' => 0,
'_customfields' => [
5 => 'customfield5' ,
16 => ‘customfield16’
]
)));