diff --git a/auth/oauth2/classes/auth.php b/auth/oauth2/classes/auth.php index fc230aa1ec3..812cf988e82 100644 --- a/auth/oauth2/classes/auth.php +++ b/auth/oauth2/classes/auth.php @@ -247,6 +247,10 @@ class auth extends \auth_plugin_base { if (!empty($user->picture)) { return false; } + if (!empty($CFG->enablegravatar)) { + return false; + } + $picture = $this->get_static_user_picture(); if (empty($picture)) { return false;