Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the new name for the config support user identifier change #2696

Open
wants to merge 1 commit into
base: MOODLE_405_STABLE
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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