MDL-58220 auth_oauth: return false for non-oauth

Always return false for non-oauth logins.
This commit is contained in:
Damyon Wiese 2017-03-28 10:27:19 +08:00
parent f59d81f487
commit bfc60d386d

View File

@ -73,6 +73,10 @@ class auth extends \auth_plugin_base {
*/
public function user_login($username, $password) {
$cached = $this->get_static_user_info();
if (empty($cached)) {
// This means we were called as part of a normal login flow - without using oauth.
return false;
}
$verifyusername = $cached['username'];
if ($verifyusername == $username) {
return true;