public function deleteUser(User $user)
    {
        foreach ($user->getAccounts() as $account) {
            $this->securityContext->withoutAuthorizationChecks(function () use ($account) {
                $this->deletePersonalWorkspace($account->getAccountIdentifier());
            });

            $this->accountRepository->remove($account);
        }

        $this->removeOwnerFromUsersWorkspaces($user);

        $this->partyRepository->remove($user);
        $this->emitUserDeleted($user);
    }