public function validateUser(AnCommandContext $context)
    {
        $package = $this->getItem();

        //validate user
        if (get_viewer()->guest() && !$this->person->validateEntity()) {
            $url = route('option=com_subscriptions&view=signup&layout=login&id='.$package->id);
            $context->response->setRedirect($url);
            return false;
        }

        return true;
    }
public function validateUser(AnCommandContext $context)
    {
        $package = $this->getItem();

        //validate user
        if (get_viewer()->guest() && !$this->person->validateEntity()) {
            $url = route('option=com_subscriptions&view=signup&layout=login&id='.$package->id);
            $context->response->setRedirect($url);
            return false;
        }

        return true;
    }
public function validateUser ( AnCommandContext $ context ) { $ package = $ this -> getItem ( ) ; //validate user if ( get_viewer ( ) -> guest ( ) && ! $ this -> person -> validateEntity ( ) ) { $ url = route ( 'option=com_subscriptions&view=signup&layout=login&id=' . $ package -> id ) ; $ context -> response -> setRedirect ( $ url ) ; return false ; } return true ; }
Validates a user.

@param AnCommandContext $context

@return bool
Validates a user .