mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 06:04:08 -08:00
Merge pull request #13828 from Godmartinz/ldap_location_sync
fixed ldap location sync
This commit is contained in:
commit
c5e1cdbcee
|
@ -83,7 +83,12 @@ class LdapSync extends Command
|
||||||
$summary = [];
|
$summary = [];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if ($this->option('base_dn') != '') {
|
if ( $this->option('location_id') != '') {
|
||||||
|
$location_ou= Location::where('id', '=', $this->option('location_id'))->value('ldap_ou');
|
||||||
|
$search_base = $location_ou;
|
||||||
|
Log::debug('Importing users from specified location OU: \"'.$search_base.'\".');
|
||||||
|
}
|
||||||
|
else if ($this->option('base_dn') != '') {
|
||||||
$search_base = $this->option('base_dn');
|
$search_base = $this->option('base_dn');
|
||||||
Log::debug('Importing users from specified base DN: \"'.$search_base.'\".');
|
Log::debug('Importing users from specified base DN: \"'.$search_base.'\".');
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue