Skip to content

Commit

Permalink
Merge pull request #8608 from nextcloud/backport/8606/stable2.2
Browse files Browse the repository at this point in the history
[stable2.2] fix(provisioning): Clear cache before returning
  • Loading branch information
ChristophWurst committed Jul 6, 2023
2 parents 06c8293 + 40806a6 commit e0ed293
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 e0ed293

Please sign in to comment.