mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
fixes ldap location sync
This commit is contained in:
parent
5073c3389f
commit
13d3f85c62
|
@ -83,7 +83,12 @@ class LdapSync extends Command
|
|||
$summary = [];
|
||||
|
||||
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');
|
||||
Log::debug('Importing users from specified base DN: \"'.$search_base.'\".');
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue