A free open source IT asset/license management system
Allows a null location value for importing LDAP users (#3598)
Wyatt3e67cdc501f5
diff --git a/app/Console/Commands/LdapSync.php b/app/Console/Commands/LdapSync.phpold mode 100644new mode 100755index 3b10b6e4c7..162a65d5a8--- a/app/Console/Commands/LdapSync.php+++ b/app/Console/Commands/LdapSync.php@@ -90,11 +90,11 @@ class LdapSync extends CommandLOG::debug('Location ID '.$this->option('location_id').' passed');LOG::debug('Importing to '.$location->name.' ('.$location->id.')');} else {- $location = new Location;- }+ $location = NULL;+ }if (!isset($location)) {- LOG::debug('That location is invalid, so no location will be assigned by default.');+ LOG::debug('That location is invalid or a location was not provided, so no location will be assigned by default.');}// Grab subsets based on location-specific DNs, and overwrite location for these users.