public function getCurrentAction()
    {
        if (!$this->isGranted('IS_AUTHENTICATED_FULLY')) {
            throw new InsufficientAuthenticationException('You must be authenticated to access');
        }

        $user = $this->getEntityManager()->find(get_class($this->getUser()), $this->getUser()->getId());

        return new Response($this->formatItem($user), 200, ['Content-Type' => 'application/json']);
    }
public function getCurrentAction()
    {
        if (!$this->isGranted('IS_AUTHENTICATED_FULLY')) {
            throw new InsufficientAuthenticationException('You must be authenticated to access');
        }

        $user = $this->getEntityManager()->find(get_class($this->getUser()), $this->getUser()->getId());

        return new Response($this->formatItem($user), 200, ['Content-Type' => 'application/json']);
    }
public function getCurrentAction ( ) { if ( ! $ this -> isGranted ( 'IS_AUTHENTICATED_FULLY' ) ) { throw new InsufficientAuthenticationException ( 'You must be authenticated to access' ) ; } $ user = $ this -> getEntityManager ( ) -> find ( get_class ( $ this -> getUser ( ) ) , $ this -> getUser ( ) -> getId ( ) ) ; return new Response ( $ this -> formatItem ( $ user ) , 200 , [ 'Content-Type' => 'application/json' ] ) ; }
GET current User.
GET current User .