A free open source IT asset/license management system
fixes ldap location sync
Godfrey M13d3f85c6207
diff --git a/app/Console/Commands/LdapSync.php b/app/Console/Commands/LdapSync.phpindex afe1070dd0..edb29614ee 100755--- a/app/Console/Commands/LdapSync.php+++ b/app/Console/Commands/LdapSync.php@@ -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 {