From 1d5fb52bfcb9018b6d334069488c146e9339805c Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 17 Oct 2017 16:59:50 -0700 Subject: [PATCH] Fix for LDAP where location ou is not null but blank --- app/Console/Commands/LdapSync.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Console/Commands/LdapSync.php b/app/Console/Commands/LdapSync.php index 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) {