Index: user/externallib.php =================================================================== RCS file: /cvsroot/moodle/moodle/user/externallib.php,v retrieving revision 1.21 diff -u -r1.21 externallib.php --- user/externallib.php 14 Apr 2010 09:45:49 -0000 1.21 +++ user/externallib.php 30 Apr 2010 10:52:52 -0000 @@ -340,7 +340,7 @@ $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) {