diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-21 16:30:42 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-21 16:30:42 +0300 |
commit | 1a2584d0bfa49acbdeb117ee7b2f5d5c210fabaa (patch) | |
tree | 65c1b7152cb48ab3f4152751ee1a42a8ba686249 /lib/BackgroundJob | |
parent | 8f0c89f5bb1bea3777c5855af43543b17a98535f (diff) |
Do not sync accounts that are provisioned and have no password set
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/BackgroundJob')
-rw-r--r-- | lib/BackgroundJob/SyncJob.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/BackgroundJob/SyncJob.php b/lib/BackgroundJob/SyncJob.php index c4759d3d4..aea334612 100644 --- a/lib/BackgroundJob/SyncJob.php +++ b/lib/BackgroundJob/SyncJob.php @@ -81,6 +81,12 @@ class SyncJob extends TimedJob { return; } + $dbAccount = $account->getMailAccount(); + if ($dbAccount->getProvisioned() && $dbAccount->getInboundPassword() === null) { + $this->logger->info("Ignoring cron sync for provisioned account that has no password set yet"); + return; + } + try { $this->mailboxSync->sync($account, true); $this->syncService->syncAccount($account); |