main/core/Controller/User/ProfileController.php
public function indexAction($user)
    {
        try {
            $profileUser = $this->repository->findOneByIdOrPublicUrl($user);
            $serializedUser = $this->userSerializer->serialize($profileUser, [Options::SERIALIZE_FACET]);

            return [
                'user' => $serializedUser,
                'facets' => $this->profileSerializer->serialize(),
                'parameters' => $this->parametersSerializer->serialize()['profile'],
            ];
        } catch (NoResultException $e) {
            throw new NotFoundHttpException('Page not found');
        }
    }
public function indexAction($user)
    {
        try {
            $profileUser = $this->repository->findOneByIdOrPublicUrl($user);
            $serializedUser = $this->userSerializer->serialize($profileUser, [Options::SERIALIZE_FACET]);

            return [
                'user' => $serializedUser,
                'facets' => $this->profileSerializer->serialize(),
                'parameters' => $this->parametersSerializer->serialize()['profile'],
            ];
        } catch (NoResultException $e) {
            throw new NotFoundHttpException('Page not found');
        }
    }
public function indexAction ( $ user ) { try { $ profileUser = $ this -> repository -> findOneByIdOrPublicUrl ( $ user ) ; $ serializedUser = $ this -> userSerializer -> serialize ( $ profileUser , [ Options :: SERIALIZE_FACET ] ) ; return [ 'user' => $ serializedUser , 'facets' => $ this -> profileSerializer -> serialize ( ) , 'parameters' => $ this -> parametersSerializer -> serialize ( ) [ 'profile' ] , ] ; } catch ( NoResultException $ e ) { throw new NotFoundHttpException ( 'Page not found' ) ; } }
Displays a user profile from its public URL or ID.

@EXT\Route("/{user}", name="claro_user_profile")
@EXT\Template("ClarolineCoreBundle:user:profile.html.twig")

@param string|int $user

@return array
Displays a user profile from its public URL or ID .