Is there an equivalent for non-admin controllers to do pre-action validations like in the admin panel?
I.e. I would like to run this in my public controller:
I.e. I would like to run this in my public controller:
PHP:
protected function preDispatchController($action, ParameterBag $params)
{
$visitor = \XF::visitor();
$auth = $visitor->Auth->getAuthenticationHandler();
if (!$auth)
{
return $this->noPermission();
}
}