Skip to content
Permalink
Browse files
Merge branch 'MDL-62316_oauth_guess_image_fix_34_STABLE' of https://g…
…ithub.com/leonstr/moodle into MOODLE_34_STABLE
  • Loading branch information
David Monllao committed May 28, 2018
2 parents 85b0aa8 + 1755077 commit c2036ae370c7e333c51775d91502dd728fdca12c
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/classes/oauth2/api.php
@@ -349,7 +349,7 @@ public static function get_user_field_mappings(issuer $issuer) {
* @param \core\oauth2\issuer $issuer The desired OAuth issuer
*/
protected static function guess_image($issuer) {
if (empty($issuer->get('image'))) {
if (empty($issuer->get('image')) && !empty($issuer->get('baseurl'))) {
$baseurl = parse_url($issuer->get('baseurl'));
$imageurl = $baseurl['scheme'] . '://' . $baseurl['host'] . '/favicon.ico';
$issuer->set('image', $imageurl);

0 comments on commit c2036ae

Please sign in to comment.