mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-35669 gravatar Fix secure image urls.
This commit is contained in:
parent
ee3502e793
commit
b96a15cc11
@ -400,6 +400,7 @@ class user_picture implements renderable {
|
||||
// If the currently requested page is https then we'll return an
|
||||
// https gravatar page.
|
||||
if (strpos($CFG->httpswwwroot, 'https:') === 0) {
|
||||
$gravatardefault = str_replace($CFG->wwwroot, $CFG->httpswwwroot, $gravatardefault); // Replace by secure url.
|
||||
return new moodle_url("https://secure.gravatar.com/avatar/{$md5}", array('s' => $size, 'd' => $gravatardefault));
|
||||
} else {
|
||||
return new moodle_url("http://www.gravatar.com/avatar/{$md5}", array('s' => $size, 'd' => $gravatardefault));
|
||||
|
Loading…
x
Reference in New Issue
Block a user