Skip to content

Commit

Permalink
Use the new name for the config support user identifier change
Browse files Browse the repository at this point in the history
  • Loading branch information
patmr7 committed Nov 18, 2024
1 parent 86fcb9f commit 3b545b2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions auth/oidc/classes/loginflow/authcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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');
}
Expand Down Expand Up @@ -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');
}

Expand Down

0 comments on commit 3b545b2

Please sign in to comment.