diff --git a/CHANGES.md b/CHANGES.md index ff28733026024ab0d09f7e915819575f7dbf146e..1789d57f45e3d09ec8d820b0fcfde7a635a946d9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,7 @@ Changes ### Unreleased +* 2018-06-25 - Bugfix: Creating users and first logins resulted in a fatal error in 3.5 because of a visibility change of update_user_record() in Moodle core. * 2018-06-25 - Check compatibility for Moodle 3.5, no functionality change. ### v3.4-r4 diff --git a/eventhandler.php b/eventhandler.php index e2fe1ecd60c7355a09414fcb94028c1c6410807e..97f5258038baa991a5de95337c6fbeb6fd9f5545 100644 --- a/eventhandler.php +++ b/eventhandler.php @@ -45,11 +45,10 @@ function update_user_onevent($eventdata) { // Do only if user has ldap_syncplus authentication. if (isset($user->auth) && $user->auth == 'ldap_syncplus') { - // Get LDAP Plugin. - $authplugin = get_auth_plugin('ldap_syncplus'); - // Update user. - $authplugin->update_user_record($user->username); + // Actually, we would want to call auth_plugin_base::update_user_record() + // which is lighter, but this function is unfortunately protected since Moodle 3.5 + update_user_record($user->username); } } }