Skip to content

Commit

Permalink
fix(provisioning): Clear cache before returning
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
  • Loading branch information
ChristophWurst authored and backportbot-nextcloud[bot] committed Jul 6, 2023
1 parent 06c8293 commit 40806a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Service/Provisioning/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,12 @@ public function provisionSingleUser(array $provisionings, IUser $user): bool {
*/
public function newProvisioning(array $data): Provisioning {
$provisioning = $this->provisioningMapper->validate($data);
return $this->provisioningMapper->insert($provisioning);
$provisioning = $this->provisioningMapper->insert($provisioning);
if ($this->cacheFactory->isAvailable()) {
$cache = $this->cacheFactory->createDistributed(self::MAIL_PROVISIONINGS);
$cache->clear();
}
return $provisioning;
}

/**
Expand Down

0 comments on commit 40806a6

Please sign in to comment.