Commit fa7429e0 authored by Franco Fichtner's avatar Franco Fichtner

ldap: fix access of non-array

parent b91de022
<?php <?php
/* /*
Copyright (C) 2014-2015 Deciso B.V. Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2007 Scott Ullrich <sullrich@gmail.com> Copyright (C) 2007 Scott Ullrich <sullrich@gmail.com>
...@@ -113,6 +114,7 @@ if ($authcfg['type'] == 'ldap') { ...@@ -113,6 +114,7 @@ if ($authcfg['type'] == 'ldap') {
} }
} }
} else { } else {
if (is_array($result)) {
// list all missing accounts // list all missing accounts
foreach ($result as $ldap_user ) { foreach ($result as $ldap_user ) {
if (!in_array($ldap_user['dn'], $confDNs)) { if (!in_array($ldap_user['dn'], $confDNs)) {
...@@ -122,6 +124,7 @@ if ($authcfg['type'] == 'ldap') { ...@@ -122,6 +124,7 @@ if ($authcfg['type'] == 'ldap') {
ksort($ldap_users); ksort($ldap_users);
} }
} }
}
} }
include('head.inc'); include('head.inc');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment