MDL-58220 auth_oauth2: Remove allow linked logins

This was already removed - I just missed some spots.
This commit is contained in:
Damyon Wiese 2017-03-28 11:02:35 +08:00
parent 5b926a6a09
commit ae596d4a54
3 changed files with 2 additions and 10 deletions

View File

@ -43,8 +43,6 @@ $string['info'] = 'External account';
$string['createnewlinkedlogin'] = 'Link a new account ({$a})';
$string['confirmationpending'] = 'This account is pending email confirmation.';
$string['emailnotallowed'] = 'The email address is not permitted at this site.';
$string['allowlinkedlogins'] = 'Allow linked logins';
$string['allowlinkedloginsdesc'] = 'Linked logins allow users to link their Moodle account to another external account which they can use to login with.';
$string['createaccountswarning'] = 'This authentication plugin allows users to create accounts on your site. You may want to enable the setting "authpreventaccountcreation" if you use this plugin.';
$string['selfregistrationdisabled'] = 'No matching account could be found on this site, and this site does not allow self registration.';
$string['confirmlinkedloginemail'] = 'Hi {$a->fullname},

View File

@ -42,10 +42,8 @@ function auth_oauth2_extend_navigation_user_settings(navigation_node $useraccoun
if (!\core\session\manager::is_loggedinas()) {
if (has_capability('auth/oauth2:managelinkedlogins', $context)) {
if (get_config('auth_oauth2', 'allowlinkedlogins')) {
$parent = $useraccount->parent->find('useraccount', navigation_node::TYPE_CONTAINER);
$parent->add(get_string('linkedlogins', 'auth_oauth2'), new moodle_url('/auth/oauth2/linkedlogins.php'));
}
$parent = $useraccount->parent->find('useraccount', navigation_node::TYPE_CONTAINER);
$parent->add(get_string('linkedlogins', 'auth_oauth2'), new moodle_url('/auth/oauth2/linkedlogins.php'));
}
}
}

View File

@ -35,10 +35,6 @@ $PAGE->set_heading($strheading);
require_login();
if (!get_config('auth_oauth2', 'allowlinkedlogins')) {
throw new moodle_exception('Linked logins are disabled.');
}
$action = optional_param('action', '', PARAM_ALPHAEXT);
if ($action == 'new') {
require_sesskey();