Allows a null location value for importing LDAP users (#3598)

* Allows a null location value for importing LDAP users

* Forgot you need to set the variable to null..
This commit is contained in:
Wyatt 2017-06-01 23:20:40 -05:00 committed by snipe
parent be42a0add1
commit 3e67cdc501

6
app/Console/Commands/LdapSync.php Normal file → Executable file
View file

@ -90,11 +90,11 @@ class LdapSync extends Command
LOG::debug('Location ID '.$this->option('location_id').' passed'); LOG::debug('Location ID '.$this->option('location_id').' passed');
LOG::debug('Importing to '.$location->name.' ('.$location->id.')'); LOG::debug('Importing to '.$location->name.' ('.$location->id.')');
} else { } else {
$location = new Location; $location = NULL;
} }
if (!isset($location)) { 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. // Grab subsets based on location-specific DNs, and overwrite location for these users.