mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 05:04:07 -08:00
Fixed #5078 - check for object or array as location in LDAP sync
This commit is contained in:
parent
9a25cb3ee7
commit
04d2542b81
|
@ -190,7 +190,13 @@ class LdapSync extends Command
|
||||||
if ($item['ldap_location_override'] == true) {
|
if ($item['ldap_location_override'] == true) {
|
||||||
$user->location_id = $item['location_id'];
|
$user->location_id = $item['location_id'];
|
||||||
} elseif ((isset($location)) && (!empty($location))) {
|
} elseif ((isset($location)) && (!empty($location))) {
|
||||||
$user->location_id = e($location->id);
|
|
||||||
|
if (is_array($location)) {
|
||||||
|
$user->location_id = $location['id'];
|
||||||
|
} elseif (is_object($location)) {
|
||||||
|
$user->location_id = $location->id;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$user->notes = 'Imported from LDAP';
|
$user->notes = 'Imported from LDAP';
|
||||||
|
|
Loading…
Reference in a new issue