fix(lookup-server): Only flag new users for lookup update / delete

If the flag was already set then we do not need to overwrite it.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
pull/51384/head
Ferdinand Thiessen 10 months ago
parent 21c09e4816
commit 712fe45f46
No known key found for this signature in database
GPG Key ID: 45FAE7268762B400
  1. 6
      core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php

@ -28,7 +28,11 @@ class LookupServerSendCheckBackgroundJob extends QueuedJob {
*/
public function run($argument): void {
$this->userManager->callForSeenUsers(function (IUser $user) {
$this->config->setUserValue($user->getUID(), 'lookup_server_connector', 'dataSend', '1');
// If the user data was not updated yet (check if LUS is enabled and if then update on LUS or delete on LUS)
// then we need to flag the user data to be checked
if ($this->config->getUserValue($user->getUID(), 'lookup_server_connector', 'dataSend', '') === '') {
$this->config->setUserValue($user->getUID(), 'lookup_server_connector', 'dataSend', '1');
}
});
}
}

Loading…
Cancel
Save