mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
syntaxer run
git-svn-id: http://www.observium.org/svn/observer/trunk@2580 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@ -126,10 +126,10 @@ 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)
|
||||
@ -137,14 +137,14 @@ function get_userlist()
|
||||
$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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user