core_user_create_users and core_user_update_users are missing some core fields

Re: core_user_create_users and core_user_update_users are missing some core fields

by Dorel Manolescu -
Number of replies: 0
Picture of Plugin developers

@biboy atienza

Looking in the code there is support for custom fields in the web-service:

###

// Custom fields.
if (!empty($user['customfields'])) {
foreach ($user['customfields'] as $customfield) {
// Profile_save_data() saves profile file it's expecting a user with the correct id,
// and custom field to be named profile_field_"shortname".
$user["profile_field_".$customfield['type']] = $customfield['value'];
}
profile_save_data((object) $user);
}

###

Just check that you have the correct syntax there. Please find attached a screen-shot with a postman request.

Any other questions let us know.

Regards



Attachment custom_fieldsws.png