summaryrefslogtreecommitdiff
path: root/lib/plugins/authldap/auth.php
diff options
context:
space:
mode:
authorSteScho <schoch@dsb.net>2014-02-03 07:39:16 +0100
committerSteScho <schoch@dsb.net>2014-02-03 07:39:16 +0100
commit38e97ed02731b8126aff3d921ad82e72212129a2 (patch)
tree0f03cb560909d911fa7058f1752385b6a35266e9 /lib/plugins/authldap/auth.php
parent3e23f03e016611fbb77e51e1ddd7e1e0327f5b2c (diff)
downloadrpg-38e97ed02731b8126aff3d921ad82e72212129a2.tar.gz
rpg-38e97ed02731b8126aff3d921ad82e72212129a2.tar.bz2
Update auth.php
As suggested by @selfthinker
Diffstat (limited to 'lib/plugins/authldap/auth.php')
-rw-r--r--lib/plugins/authldap/auth.php10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php
index d9d4b3d20..98858cb40 100644
--- a/lib/plugins/authldap/auth.php
+++ b/lib/plugins/authldap/auth.php
@@ -242,13 +242,9 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
if(is_array($result)) foreach($result as $grp) {
if(!empty($grp[$this->getConf('groupkey')][0])) {
- if(is_array($grp[$this->getConf('groupkey')][0])) {
- $this->_debug('LDAP usergroup: '.htmlspecialchars($grp[$this->getConf('groupkey')][0]), 0, __LINE__, __FILE__);
- $info['grps'][] = $grp[$this->getConf('groupkey')][0];
- } else {
- $this->_debug('LDAP usergroup: '.htmlspecialchars($grp[$this->getConf('groupkey')]), 0, __LINE__, __FILE__);
- $info['grps'][] = $grp[$this->getConf('groupkey')];
- }
+ $groupkey = (is_array($grp[$this->getConf('groupkey')][0])) ? $grp[$this->getConf('groupkey')][0] : $grp[$this->getConf('groupkey')];
+ $this->_debug('LDAP usergroup: '.htmlspecialchars($groupkey), 0, __LINE__, __FILE__);
+ $info['grps'][] = $groupkey;
}
}
}