mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix: Make irc bot to use authentication module for user info (#4372)
This commit is contained in:
committed by
Tony Murray
parent
b397e23763
commit
9e85f24b00
@@ -108,8 +108,9 @@ function get_userlevel($username)
|
||||
// Loop the list and find the highest level
|
||||
foreach ($entries as $entry) {
|
||||
$groupname = $entry['cn'][0];
|
||||
$userlevel = array();
|
||||
if ($config['auth_ldap_groups'][$groupname]['level'] > $userlevel) {
|
||||
$userlevel = $config['auth_ldap_groups'][$groupname]['level'];
|
||||
$userlevel['level'] = $config['auth_ldap_groups'][$groupname]['level'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -190,7 +191,7 @@ function get_user($user_id)
|
||||
{
|
||||
foreach (get_userlist() as $users) {
|
||||
if ($users['user_id'] === $user_id) {
|
||||
return $users['username'];
|
||||
return $users;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user