From ec4974d45f805865f82f4bba9c22433b1cae5618 Mon Sep 17 00:00:00 2001 From: Patryk Mroczko Date: Fri, 15 Nov 2024 13:06:26 +0100 Subject: [PATCH] Use the new name for the config support user identifier change --- auth/oidc/classes/loginflow/authcode.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/auth/oidc/classes/loginflow/authcode.php b/auth/oidc/classes/loginflow/authcode.php index 581fd7d38..3cad3deae 100644 --- a/auth/oidc/classes/loginflow/authcode.php +++ b/auth/oidc/classes/loginflow/authcode.php @@ -572,7 +572,7 @@ protected function handlelogin(string $oidcuniqid, array $authparams, array $tok } } - $supportupnchangeconfig = get_config('local_o365', 'support_upn_change'); + $supportuseridentifierchangeconfig = get_config('local_o365', 'support_user_identifier_change'); if (!empty($tokenrec)) { // Already connected user. @@ -612,7 +612,7 @@ protected function handlelogin(string $oidcuniqid, array $authparams, array $tok // Handle username change - update token, update connection. if ($usernamechanged) { - if ($supportupnchangeconfig != 1) { + if ($supportuseridentifierchangeconfig != 1) { // Username change is not supported, throw exception. throw new moodle_exception('errorupnchangeisnotsupported', 'local_o365', null, null, '2'); } @@ -668,7 +668,7 @@ protected function handlelogin(string $oidcuniqid, array $authparams, array $tok // 2. create token record, // 3. update connection record in local_o365_objects table. - if ($supportupnchangeconfig != 1) { + if ($supportuseridentifierchangeconfig != 1) { throw new moodle_exception('errorupnchangeisnotsupported', 'local_o365', null, null, '2'); }