LPH
Well-known member
Hi
I'm working on a logout form external to XenForo 2. In XenForo 2, the template account_visitor_menu builds a link with a null in it. What is the null referencing?
Currently, my form is based on XenForo 1, which had a redirect.
I'm thinking the redirect needs to be removed in the array because XenForo 2 doesn't support it but I'm not clear if a null needs to be included. Any help would be appreciated.
I'm working on a logout form external to XenForo 2. In XenForo 2, the template account_visitor_menu builds a link with a null in it. What is the null referencing?
Code:
<a href="{{ link('logout', null, {'t': csrf_token()}) }}" class="menu-linkRow">{{ phrase('log_out') }}</a>
Currently, my form is based on XenForo 1, which had a redirect.
Code:
echo '<a class="xenword_logout logout" href="' . \XF::app()->router()->buildLink( 'canonical:logout', $visitor, array(
't' => htmlspecialchars(\XF::app()->container( 'csrf.token' ) ),
'redirect' => $redirect_out
) ) . '">Logout</a>';
I'm thinking the redirect needs to be removed in the array because XenForo 2 doesn't support it but I'm not clear if a null needs to be included. Any help would be appreciated.