From e687ca03bf3ed8abb08cc65f7fa2547112e36b23 Mon Sep 17 00:00:00 2001 From: fermin831 Date: Fri, 17 Aug 2018 11:29:19 +0200 Subject: [PATCH] Fixed several attributes in a ldap configuration --- pandora_console/include/auth/mysql.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pandora_console/include/auth/mysql.php b/pandora_console/include/auth/mysql.php index f2aff5ed44..835a709ba8 100644 --- a/pandora_console/include/auth/mysql.php +++ b/pandora_console/include/auth/mysql.php @@ -349,15 +349,15 @@ function process_user_login_remote ($login, $pass, $api = false) { foreach ($attributes as $attr) { $attr = explode('=', $attr, 2); - if(preg_match('/' . $attr[1] . '/', $sr[$attr[0]][0])){ - $permissions[$i]["profile"] = $ldap_adv_perm['profile']; - $permissions[$i]["groups"] = $ldap_adv_perm['group']; - $permissions[$i]["tags"] = implode(",",$ldap_adv_perm['tags']); - $i++; - break; + foreach ($sr[$attr[0]] as $s_attr) { + if(preg_match('/' . $attr[1] . '/', $s_attr)){ + $permissions[$i]["profile"] = $ldap_adv_perm['profile']; + $permissions[$i]["groups"] = $ldap_adv_perm['group']; + $permissions[$i]["tags"] = implode(",",$ldap_adv_perm['tags']); + $i++; + } } } - } } else { $permissions[0]["profile"] = $config['default_remote_profile'];