Only overwrite notes if the LDAP user is new

This commit is contained in:
snipe 2020-12-02 11:00:18 -08:00
parent 269d3fe509
commit bec2b170ec

View file

@ -243,7 +243,12 @@ class LdapAd extends LdapAdConfiguration
if (array_key_exists('location_id',$userInfo)) { if (array_key_exists('location_id',$userInfo)) {
$user->location_id = $userInfo['location_id']; $user->location_id = $userInfo['location_id'];
} }
// this is a new user
if (!isset($user->id)) {
$user->notes = 'Imported from LDAP'; $user->notes = 'Imported from LDAP';
}
$user->ldap_import = 1; $user->ldap_import = 1;
return $user; return $user;