diff --git a/user/externallib.php b/user/externallib.php
index 598b1da..434691a 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));
@@ -143,6 +143,9 @@ class moodle_user_external extends external_api {
             $user['confirmed'] = true;
             $user['id'] = user_create_user($user);
 
+            //  Create the user context
+            $personalcontext = get_context_instance(CONTEXT_USER, $user['id']);
+
             // custom fields
             if(!empty($user['customfields'])) {
                 foreach($user['customfields'] as $customfield) {
