diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php
index e43c3f828504730c34c276b0d3cdedcce18ccf86..6a967a6d4dd3840317bb0fce5123e619775fa3b1 100644
--- a/lib/plugins/authldap/auth.php
+++ b/lib/plugins/authldap/auth.php
@@ -248,7 +248,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
         }
 
         // always add the default group to the list of groups
-        if(!in_array($conf['defaultgroup'], $info['grps'])) {
+        if(!$info['grps'] or !in_array($conf['defaultgroup'], $info['grps'])) {
             $info['grps'][] = $conf['defaultgroup'];
         }
         return $info;