diff --git a/user/externallib.php b/user/externallib.php
index 598b1da..a73753c 100644
--- a/user/externallib.php
+++ b/user/externallib.php
@@ -93,7 +93,7 @@ class moodle_user_external extends external_api {
         $context = get_context_instance(CONTEXT_SYSTEM);
         self::validate_context($context);
         require_capability('moodle/user:create', $context);
-        
+
         // Do basic automatic PARAM checks on incoming data, using params description
         // If any problems are found then exceptions are thrown with helpful error messages
         $params = self::validate_parameters(self::create_users_parameters(), array('users'=>$users));
@@ -155,7 +155,7 @@ class moodle_user_external extends external_api {
 
             //TODO: preferences
 
-            $userids[] = array('id'=>$user['id'], 'username'=>$user['username']);
+            $userids[] = array('id'=>$user['id'], 'username'=>$user['username'], 'idnumber'=>$user['idnumber']);
         }
 
         $transaction->allow_commit();
@@ -173,6 +173,7 @@ class moodle_user_external extends external_api {
                 array(
                     'id'       => new external_value(PARAM_INT, 'user id'),
                     'username' => new external_value(PARAM_RAW, 'user name'),
+                    'idnumber' => new external_value(PARAM_RAW, 'user idnumber')
                 )
             )
         );
