MDL-59876 core_user: Add required library for function.
authorAdrian Greeve <adrian@moodle.com>
Wed, 15 Nov 2017 03:43:19 +0000 (11:43 +0800)
committerAdrian Greeve <adrian@moodle.com>
Wed, 15 Nov 2017 03:43:19 +0000 (11:43 +0800)
The external service create_users has a function call to
useredit_update_user_preference() that requires editlib.php

user/externallib.php

index ce0b580..97f5308 100644 (file)
@@ -133,6 +133,7 @@ class core_user_external extends external_api {
         global $CFG, $DB;
         require_once($CFG->dirroot."/lib/weblib.php");
         require_once($CFG->dirroot."/user/lib.php");
+        require_once($CFG->dirroot."/user/editlib.php");
         require_once($CFG->dirroot."/user/profile/lib.php"); // Required for customfields related function.
 
         // Ensure the current user is allowed to run this function.