mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 08:22:07 +02:00
MDL-58220 oauth2: Minor cleanups
Fixes spotted by Jun in peer review.
This commit is contained in:
parent
28b592d5a6
commit
99e3c347f9
@ -621,7 +621,7 @@ class api {
|
||||
*
|
||||
* Requires moodle/site:config capability at the system context.
|
||||
*
|
||||
* @param int $id The id of the identity issuer to enable.
|
||||
* @param int $id The id of the identity issuer to disable.
|
||||
* @return boolean
|
||||
*/
|
||||
public static function disable_issuer($id) {
|
||||
|
@ -150,6 +150,7 @@ class issuer extends persistent {
|
||||
$emaildomain = $parts[1];
|
||||
}
|
||||
|
||||
$emaildomain = \core_text::strtolower(trim($emaildomain));
|
||||
foreach ($validdomains as $checkdomain) {
|
||||
$checkdomain = \core_text::strtolower(trim($checkdomain));
|
||||
|
||||
|
@ -140,8 +140,6 @@ class core_oauth2_testcase extends advanced_testcase {
|
||||
* Tests we can enable and disable an issuer.
|
||||
*/
|
||||
public function test_enable_disable_issuer() {
|
||||
global $SESSION;
|
||||
|
||||
$this->resetAfterTest();
|
||||
$this->setAdminUser();
|
||||
|
||||
@ -170,8 +168,6 @@ class core_oauth2_testcase extends advanced_testcase {
|
||||
* Test the alloweddomains for an issuer.
|
||||
*/
|
||||
public function test_issuer_alloweddomains() {
|
||||
global $SESSION;
|
||||
|
||||
$this->resetAfterTest();
|
||||
$this->setAdminUser();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user