webservice MDL-22255 fix moodle_user_get_users_by_id() ws function when no custom field are returned

This commit is contained in:
jerome mouneyrac
2010-07-06 09:17:49 +00:00
parent a6bfa66c35
commit 0f31850a35
+1 -1
View File
@@ -354,7 +354,7 @@ class moodle_user_external extends external_api {
$userarray = (array) $user; //we want to return an array not an object
/// now we transfert all profile_field_xxx into the customfields external_multiple_structure required by description
$userarray['customfields'] = null;
$userarray['customfields'] = array();
$customfields = profile_user_record($user->id);
$customfields = (array) $customfields;
foreach ($customfields as $key => $value) {