From 04e4890db370bdb57201f76581fe3dc0a3adb614 Mon Sep 17 00:00:00 2001 From: Andreas Gohr <andi@splitbrain.org> Date: Fri, 7 Jun 2013 13:50:46 +0200 Subject: [PATCH] fix problem when ldap returns no groups FS#2788 --- lib/plugins/authldap/auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index e43c3f828..6a967a6d4 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; -- GitLab