Permalink
Browse files

Merge branch 'MDL-62316_oauth_guess_image_fix' of https://github.com/…

  • Loading branch information...
dmonllao committed May 28, 2018
2 parents c89b495 + 02cc1ec commit 77e7c45487f4716a68fb1dc290ae140ea2a3afb4
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 77e7c45

Please sign in to comment.