From 029ec1edfe89c4088e3bf8cf48a51b49825694a3 Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Mon, 29 Jan 2018 11:30:05 +0800 Subject: [PATCH] MDL-61260 auth_ldap: require /user/profile/lib.php file --- auth/ldap/auth.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/auth/ldap/auth.php b/auth/ldap/auth.php index b923003dd4a..e7b5eb72370 100644 --- a/auth/ldap/auth.php +++ b/auth/ldap/auth.php @@ -1083,7 +1083,9 @@ class auth_plugin_ldap extends auth_plugin_base { * */ function user_update($olduser, $newuser) { - global $USER; + global $CFG; + + require_once($CFG->dirroot . '/user/profile/lib.php'); if (isset($olduser->username) and isset($newuser->username) and $olduser->username != $newuser->username) { error_log($this->errorlogtag.get_string('renamingnotallowed', 'auth_ldap'));