[UI][UserPanel] Do not try to re-set an unchanged nickname

This commit is contained in:
Diogo Peralta Cordeiro 2022-01-12 17:46:13 +00:00
parent 480f570238
commit 14b03c7137
No known key found for this signature in database
GPG Key ID: 18D2D35001FBFAB0

View File

@ -81,7 +81,9 @@ class ActorForms
// Setting nickname normalised and setting actor cache
$extra_step = function ($data, $extra_args) use ($user, $target) {
$user->setNicknameSanitizedAndCached($data['nickname']);
if ($user->getNickname() !== $data['nickname']) {
$user->setNicknameSanitizedAndCached($data['nickname']);
}
$cache_keys = Actor::cacheKeys($target->getId());
foreach (['id', 'nickname', 'fullname'] as $key) {