From c19ef03f719ca4b381ef3d9a5c34aafe0910d17d Mon Sep 17 00:00:00 2001 From: Benjamin Wolf Date: Fri, 20 Apr 2018 13:15:15 +0200 Subject: [PATCH] MDL-56093 auth_db: Save custom profile fields in auth_db --- auth/db/auth.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/auth/db/auth.php b/auth/db/auth.php index bcb26df152a..14ca12f1eed 100644 --- a/auth/db/auth.php +++ b/auth/db/auth.php @@ -473,6 +473,12 @@ class auth_plugin_db extends auth_plugin_base { set_user_preference('auth_forcepasswordchange', 1, $id); set_user_preference('create_password', 1, $id); } + + // Save custom profile fields here(MDL-56093). + require_once($CFG->dirroot . '/user/profile/lib.php'); + $user->id = $id; + profile_save_data($user); + // Make sure user context is present. context_user::instance($id); }