Skip to content
Permalink
Browse files
Merge branch 'MDL-62316_oauth_guess_image_fix_35_STABLE' of https://g…
…ithub.com/leonstr/moodle into MOODLE_35_STABLE
  • Loading branch information
David Monllao committed May 28, 2018
2 parents 0b363e6 + 6d7093e commit 575e209b9371361cd486de6751c2419269e27c2e
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 575e209

Please sign in to comment.