Skip to content

Commit

Permalink
fix: Fire UserChangedEvent only after change happenned
Browse files Browse the repository at this point in the history
This is not a before event, so the user should already have been changed
 when it fires. Should fix issues with dav address book and newly mapped
 saml users.

Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc authored and backportbot[bot] committed Aug 16, 2024
1 parent 60d8302 commit 8355cb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/UserBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -657,8 +657,8 @@ public function updateAttributes($uid,
$currentDisplayname = $this->getDisplayName($uid);
if ($newDisplayname !== null
&& $currentDisplayname !== $newDisplayname) {
$this->eventDispatcher->dispatchTyped(new UserChangedEvent($user, 'displayName', $newDisplayname, $currentDisplayname));
$this->setDisplayName($uid, $newDisplayname);
$this->eventDispatcher->dispatchTyped(new UserChangedEvent($user, 'displayName', $newDisplayname, $currentDisplayname));
}

if ($newQuota !== null) {
Expand Down

0 comments on commit 8355cb0

Please sign in to comment.