fix: Make irc bot to use authentication module for user info (#4372)

This commit is contained in:
Neil Lathwood
2016-09-12 17:24:22 +01:00
committed by Tony Murray
parent b397e23763
commit 9e85f24b00
3 changed files with 8 additions and 4 deletions

View File

@@ -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;