diff --git a/html/includes/authentication/http-auth.inc.php b/html/includes/authentication/http-auth.inc.php index 3fa8f0e1a3..141d80c2f7 100644 --- a/html/includes/authentication/http-auth.inc.php +++ b/html/includes/authentication/http-auth.inc.php @@ -69,4 +69,9 @@ function deluser($username) return 0; } +function get_userlist() +{ + return dbFetchRows("SELECT * FROM `users`"); +} + ?> diff --git a/html/includes/authentication/ldap.inc.php b/html/includes/authentication/ldap.inc.php index 94f9791fed..3ba08fc054 100644 --- a/html/includes/authentication/ldap.inc.php +++ b/html/includes/authentication/ldap.inc.php @@ -121,4 +121,31 @@ function deluser($username) return 0; } +function get_userlist() +{ + global $config, $ds; + + $filter = '(' . $config['auth_ldap_prefix'] . '*)'; + + $search = ldap_search($ds, trim($config['auth_ldap_suffix'],','), $filter); + $entries = ldap_get_entries($ds, $search); + + if ($entries['count']) + { + foreach ($entries as $entry) + { + $username = $entry['uid'][0]; + $realname = $entry['cn'][0]; + $user_id = $entry['uidnumber'][0]; + + if (!isset($config['auth_ldap_group']) || ldap_compare($ds,$config['auth_ldap_group'],'memberUid',$username)) + { + $userlist[] = array('username' => $username, 'realname' => $realname, 'user_id' => $user_id); + } + } + } + + return $userlist; +} + ?> diff --git a/html/includes/authentication/mysql.inc.php b/html/includes/authentication/mysql.inc.php index 3ea373e238..080823c2fd 100644 --- a/html/includes/authentication/mysql.inc.php +++ b/html/includes/authentication/mysql.inc.php @@ -110,5 +110,9 @@ function deluser($username) } +function get_userlist() +{ + return dbFetchRows("SELECT * FROM `users`"); +} ?> diff --git a/html/includes/print-menubar.php b/html/includes/print-menubar.php index 56197879bb..472757eefc 100644 --- a/html/includes/print-menubar.php +++ b/html/includes/print-menubar.php @@ -555,10 +555,10 @@ $netsnmp_version = shell_exec($config['snmpget'] . " --version"); echo('