MDL-58220 oauth2: Minor cleanups

Fixes spotted by Jun in peer review.
This commit is contained in:
Damyon Wiese 2017-03-23 16:53:07 +08:00
parent 28b592d5a6
commit 99e3c347f9
3 changed files with 2 additions and 5 deletions

View File

@ -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) {

View File

@ -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));

View File

@ -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();