Skip to content

A free open source IT asset/license management system

Merge branch 'develop' into ldap_sync_bug

Godfrey Martinez5569c2ba4a1b
diff --cc app/Console/Commands/LdapSync.php
index e11d269ef8,1a8521487b..594f6f064f
--- a/app/Console/Commands/LdapSync.php
+++ b/app/Console/Commands/LdapSync.php
@@@ -83,11 -83,14 +83,15 @@@ class LdapSync extends Comman
$summary = [];
try {
- if ( !empty($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.'\".');
- }
+ if ( $this->option('location_id') != '') {
+
+ foreach($this->option('location_id') as $location_id){
+ $location_ou= Location::where('id', '=', $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.'\".');