Skip to content

Commit

Permalink
Merge branch 'MDL-62316_oauth_guess_image_fix_34_STABLE' of https://g…
Browse files Browse the repository at this point in the history
…ithub.com/leonstr/moodle into MOODLE_34_STABLE
  • Loading branch information
David Monllao committed May 28, 2018
2 parents 85b0aa8 + 1755077 commit c2036ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/classes/oauth2/api.php
Expand Up @@ -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);
Expand Down

0 comments on commit c2036ae

Please sign in to comment.