ENXF NET
Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
- Joined
- Nov 13, 2018
- Messages
- 21,479
- Points
- 823
Reputation:
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:
PHP:
Continue reading...
I.e. I would like to run this in my public controller:
PHP:
Code:
protected function preDispatchController($action, ParameterBag $params)
{
$visitor = \XF::visitor();
$auth = $visitor->Auth->getAuthenticationHandler();
if (!$auth)
{
return $this->noPermission();
}
}
Continue reading...