public function isLogged()
    {
        return $this->get('security.token_storage')->getToken() && $this->get('security.token_storage')->getToken()->isAuthenticated() && is_object($this->getUser());
    }
public function isLogged()
    {
        return $this->get('security.token_storage')->getToken() && $this->get('security.token_storage')->getToken()->isAuthenticated() && is_object($this->getUser());
    }
public function isLogged ( ) { return $ this -> get ( 'security.token_storage' ) -> getToken ( ) && $ this -> get ( 'security.token_storage' ) -> getToken ( ) -> isAuthenticated ( ) && is_object ( $ this -> getUser ( ) ) ; }
Indicates if the user is logged or not.

@return bool
Indicates if the user is logged or not .