Merge pull request #13397 from uberbrady/fix_locationless_ldap_sync

Fixed #13372: Put guard around assigning location via LDAP
This commit is contained in:
snipe 2023-08-07 17:06:58 +01:00 committed by GitHub
commit 32d8d8c50e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -243,7 +243,7 @@ class LdapSync extends Command
$user->jobtitle = $item['jobtitle'];
$user->country = $item['country'];
$user->department_id = $department->id;
$user->location_id = $location->id;
$user->location_id = $location ? $location->id : null;
if($item['manager'] != null) {
// Check Cache first