Neos\Neos\Domain\Service\UserService::deletePersonalWorkspace PHP Method

deletePersonalWorkspace() protected method

Removes all personal workspaces of the given user's account if these workspaces exist. Also removes all possibly existing content of these workspaces.
protected deletePersonalWorkspace ( string $accountIdentifier ) : void
$accountIdentifier string Identifier of the user's account
return void
    protected function deletePersonalWorkspace($accountIdentifier)
    {
        $userWorkspace = $this->workspaceRepository->findByIdentifier(UserUtility::getPersonalWorkspaceNameForUsername($accountIdentifier));
        if ($userWorkspace instanceof Workspace) {
            $this->publishingService->discardAllNodes($userWorkspace);
            $this->workspaceRepository->remove($userWorkspace);
        }
    }