turkyalawlqy
Active member
Hi How to use
use in XenForo 1.x
How to do in XenForo 2.x
Thanks
front_controller_pre_view
in XenForo 2.xuse in XenForo 1.x
PHP:
public static function frontControllerPreView(XenForo_FrontController $fc, XenForo_ControllerResponse_Abstract &$controllerResponse, XenForo_ViewRenderer_Abstract &$viewRenderer, array &$containerParams)
{
$dependencies = $fc->getDependencies();
$request = $fc->getRequest();
$requestUri = $request->getRequestUri();
if (!strstr($requestUri, '/account/') && $dependencies instanceof XenForo_Dependencies_Public)
{
$redirect = new XenForo_ControllerResponse_Redirect();
$redirect->redirectType = XenForo_ControllerResponse_Redirect::SUCCESS;
$redirect->redirectTarget = XenForo_Link::buildPublicLink('account');
$controllerResponse = $redirect;
}
}
How to do in XenForo 2.x
Thanks