From 8355cb0e1048af889375b313330b677ace07271c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 13 Aug 2024 16:05:00 +0200 Subject: [PATCH] fix: Fire UserChangedEvent only after change happenned MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- lib/UserBackend.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/UserBackend.php b/lib/UserBackend.php index 26ed85ce1..8e259e4e8 100644 --- a/lib/UserBackend.php +++ b/lib/UserBackend.php @@ -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) {