diff --git a/lib/badgeslib.php b/lib/badgeslib.php
index <HASH>..<HASH> 100644
--- a/lib/badgeslib.php
+++ b/lib/badgeslib.php
@@ -901,11 +901,14 @@ function badges_install_default_backpacks() {
  * @return array
  */
 function badges_get_default_issuer() {
-    global $CFG;
+    global $CFG, $SITE;
 
     $issuer = array();
     $issuerurl = new moodle_url('/badges/issuer.php');
     $issuer['name'] = $CFG->badges_defaultissuername;
+    if (empty($issuer['name'])) {
+        $issuer['name'] = $SITE->fullname ? $SITE->fullname : $SITE->shortname;
+    }
     $issuer['url'] = $issuerurl->out(false);
     $issuer['email'] = $CFG->badges_defaultissuercontact;
     $issuer['@context'] = OPEN_BADGES_V2_CONTEXT;
MDL-<I> badges: Default Issuer name

If the issuer name is not set, use the site name.