Merge branch 'MDL-59539-master' of git://github.com/tobiasreischmann/moodle
authorDavid Monllao <david.monllao@gmail.com>
Mon, 17 Jul 2017 08:14:55 +0000 (10:14 +0200)
committerDavid Monllao <david.monllao@gmail.com>
Mon, 17 Jul 2017 08:14:55 +0000 (10:14 +0200)
lib/classes/oauth2/api.php

index d7c0cad..966ea3f 100644 (file)
@@ -349,7 +349,7 @@ class api {
      */
     protected static function guess_image($issuer) {
         if (empty($issuer->get('image'))) {
-            $baseurl = parse_url($issuer->get('discoveryurl'));
+            $baseurl = parse_url($issuer->get('baseurl'));
             $imageurl = $baseurl['scheme'] . '://' . $baseurl['host'] . '/favicon.ico';
             $issuer->set('image', $imageurl);
             $issuer->update();