Skip to content

A free open source IT asset/license management system

Use correct array when deleting users with location (#3769)

Jan Felix Wiebe5cc84ca13742
diff --git a/app/Console/Commands/LdapSync.php b/app/Console/Commands/LdapSync.php
index 162a65d5a8..48b7697356 100755
--- a/app/Console/Commands/LdapSync.php
+++ b/app/Console/Commands/LdapSync.php
@@ -109,7 +109,7 @@ class LdapSync extends Command
// Delete located users from the general group.
foreach ($results as $key => $generic_entry) {
- if (in_array($generic_entry[$ldap_result_username][0], $location_users)) {
+ if (in_array($generic_entry[$ldap_result_username][0], $usernames)) {
unset($results[$key]);
}
}