bundle/EventListener/UserEventListener.php
protected function getUserName(User $user): string
    {
        $contentInfo = $this->repository->sudo(
            function (Repository $repository) use ($user): ContentInfo {
                return $this->loadService->loadContent($user->id)->contentInfo;
            }
        );

        return $contentInfo->name;
    }
protected function getUserName(User $user): string
    {
        $contentInfo = $this->repository->sudo(
            function (Repository $repository) use ($user): ContentInfo {
                return $this->loadService->loadContent($user->id)->contentInfo;
            }
        );

        return $contentInfo->name;
    }
protected function getUserName ( User $ user ) : string { $ contentInfo = $ this -> repository -> sudo ( function ( Repository $ repository ) use ( $ user ) : ContentInfo { return $ this -> loadService -> loadContent ( $ user -> id ) -> contentInfo ; } ) ; return $ contentInfo -> name ; }
Returns the translated user name.
Returns the translated user name .