Skip to content

Commit

Permalink
Merge branch 'wip-94735-m402' into MOODLE_402_STABLE
Browse files Browse the repository at this point in the history
  • Loading branch information
weilai-irl committed Oct 3, 2023
2 parents 6a16677 + 96f9383 commit 0f528cf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@
$desc = new lang_string('settings_setup_step2_desc', 'local_o365');

$systemapiuser = get_config('local_o365', 'systemtokens');
$enableapponlyaccess = get_config('local_o365', 'enableapponlyaccess');
if (!empty($enableapponlyaccess) && !empty($systemapiuser)) {
// Both "Application access" and "System API user" are enabled - we simply disable "System API user".
unset_config('systemtokens', 'local_o365');
$systemapiuser = null;
}
if (!empty($systemapiuser)) {
// Show option to convert to app only access.
$desc .= new lang_string('settings_setup_step2_desc_additional', 'local_o365');
Expand Down

0 comments on commit 0f528cf

Please sign in to comment.