Skip to content

Commit

Permalink
Merge pull request #1682 from nextcloud/fix-display-name-of-new-users
Browse files Browse the repository at this point in the history
Fix display name of new users
  • Loading branch information
mejo- authored Sep 10, 2024
2 parents 68fe05c + 3903094 commit 00e64ce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Listeners/AccountUpdated.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

use Exception;
use OCA\Circles\Db\CircleRequest;
use OCA\Circles\Db\MemberRequest;
use OCA\Circles\FederatedItems\MemberDisplayName;
use OCA\Circles\Model\Federated\FederatedEvent;
use OCA\Circles\Model\Probes\CircleProbe;
Expand All @@ -30,7 +31,8 @@ public function __construct(
private CircleService $circleService,
private FederatedEventService $federatedEventService,
private FederatedUserService $federatedUserService,
private LoggerInterface $logger
private LoggerInterface $logger,
private MemberRequest $memberRequest
) {
}

Expand All @@ -47,6 +49,7 @@ public function handle(Event $event): void {
$user = $event->getUser();
$federatedUser = $this->federatedUserService->getLocalFederatedUser($user->getUID());

$this->memberRequest->updateDisplayName($federatedUser->getSingleId(), $user->getDisplayName());
$this->circleRequest->updateDisplayName($federatedUser->getSingleId(), $user->getDisplayName());
$this->federatedUserService->setCurrentUser($federatedUser);

Expand Down

0 comments on commit 00e64ce

Please sign in to comment.