public function viewAction(Application $app, Request $request, $id)
    {
        $user = $this->userManager->getUser($id);

        if (!$user) {
            throw new NotFoundHttpException('No user was found with that ID.');
        }

        if (!$user->isEnabled() && !$app['security']->isGranted('ROLE_ADMIN')) {
            throw new NotFoundHttpException('That user is disabled (pending email confirmation).');
        }

        return $app['twig']->render($this->getTemplate('view'), array(
            'layout_template' => $this->getTemplate('layout'),
            'user' => $user,
            'imageUrl' => $this->getGravatarUrl($user->getEmail()),
        ));

    }
public function viewAction(Application $app, Request $request, $id)
    {
        $user = $this->userManager->getUser($id);

        if (!$user) {
            throw new NotFoundHttpException('No user was found with that ID.');
        }

        if (!$user->isEnabled() && !$app['security']->isGranted('ROLE_ADMIN')) {
            throw new NotFoundHttpException('That user is disabled (pending email confirmation).');
        }

        return $app['twig']->render($this->getTemplate('view'), array(
            'layout_template' => $this->getTemplate('layout'),
            'user' => $user,
            'imageUrl' => $this->getGravatarUrl($user->getEmail()),
        ));

    }
public function viewAction ( Application $ app , Request $ request , $ id ) { $ user = $ this -> userManager -> getUser ( $ id ) ; if ( ! $ user ) { throw new NotFoundHttpException ( 'No user was found with that ID.' ) ; } if ( ! $ user -> isEnabled ( ) && ! $ app [ 'security' ] -> isGranted ( 'ROLE_ADMIN' ) ) { throw new NotFoundHttpException ( 'That user is disabled (pending email confirmation).' ) ; } return $ app [ 'twig' ] -> render ( $ this -> getTemplate ( 'view' ) , array ( 'layout_template' => $ this -> getTemplate ( 'layout' ) , 'user' => $ user , 'imageUrl' => $ this -> getGravatarUrl ( $ user -> getEmail ( ) ) , ) ) ; }
View user action.

@param Application $app
@param Request $request
@param int $id
@return Response
@throws NotFoundHttpException if no user is found with that ID.
View user action .