Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/private/Profile/ProfileManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,13 +347,15 @@ public function getProfileConfig(IUser $targetUser, ?IUser $visitingUser): array
$this->filterNotStoredProfileConfig($config->getConfigArray()),
));
$this->configMapper->update($config);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: BTW, do we really need to update the config at each call? Can't we just check if the merged config has been updated and only update it in this case?

$this->configCache[$targetUser->getUID()] = $config;
$configArray = $config->getConfigArray();
} catch (DoesNotExistException $e) {
// Create a new default config if it does not exist
$config = new ProfileConfig();
$config->setUserId($targetUser->getUID());
$config->setConfigArray($defaultProfileConfig);
$this->configMapper->insert($config);
$this->configCache[$targetUser->getUID()] = $config;
$configArray = $config->getConfigArray();
}

Expand Down