A free open source IT asset/license management system
Fix for LDAP where location ou is not null but blank
snipe1d5fb52bfcb9
diff --git a/app/Console/Commands/LdapSync.php b/app/Console/Commands/LdapSync.phpindex 09e71a3b2e..6ebfe62192 100755--- a/app/Console/Commands/LdapSync.php+++ b/app/Console/Commands/LdapSync.php@@ -70,7 +70,7 @@ class LdapSync extends Command$results = Ldap::findLdapUsers();// Retrieve locations with a mapped OU, and sort them from the shallowest to deepest OU (see #3993)- $ldap_ou_locations = Location::whereNotNull('ldap_ou')->get()->toArray();+ $ldap_ou_locations = Location::where('ldap_ou', '!=', '')->get()->toArray();$ldap_ou_lengths = array();foreach ($ldap_ou_locations as $location) {