Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'MDL-62316_oauth_guess_image_fix' of https://github.com/…
  • Loading branch information
David Monllao committed May 28, 2018
2 parents c89b495 + 02cc1ec commit 77e7c45
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 77e7c45

Please sign in to comment.