From 95e13556dfb82260b442b1ebb320c10df4a7861f Mon Sep 17 00:00:00 2001 From: Damyon Wiese Date: Fri, 12 May 2017 11:43:47 +0800 Subject: [PATCH] MDL-58908 auth_oauth2: Don't kill gravatar If gravatar is enabled, don't update profile pictures. --- auth/oauth2/classes/auth.php | 4 ++++ 1 file changed, 4 insertions(+) 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;