diff options
Diffstat (limited to 'etc/inc/auth.inc')
-rw-r--r-- | etc/inc/auth.inc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc index eeb0aef..cc486e0 100644 --- a/etc/inc/auth.inc +++ b/etc/inc/auth.inc @@ -337,8 +337,9 @@ function isSystemAdmin($username = "") { if($config['system']['webgui']['backend'] == "ldap") { $groups = ldap_get_groups($username); - if(in_array("admins", $groups)) - return true; + if(is_array($groups)) + if(in_array("admins", $groups)) + return true; } if ($username == "") { return 0; } |