OverlayTrigger requires login

XFA

Well-known member
Hello,

I have an OverlayTrigger link that make a call to an action of the Account ControllerPublic class (new action in extending class of my add-on).

If I am logged-in, the overlay popup opens with the content I expect.
However when I am not logged-in, the overlay popup opens with a "You must be logged-in etc..." with the logging fields.

Is there any checks in XenForo initialization that blocks some actions when not logged-in ?

I thought Overlay content loading was working for non logged-in as it works for the member card overlays.

Clément
 
The account controller has a _preDispatch action:
PHP:
/**
 * Enforce registered-users only for all actions in this controller
 *
 * @see library/XenForo/XenForo_Controller#_preDispatch($action)
 */
protected function _preDispatch($action)
{
    $this->_assertRegistrationRequired();
}
 
What Chris Said ^

May be best not to use the account controller, but if you really want to use it for some reason you can add this to your controller that extends it:

PHP:
protected function _preDispatch($action)
{
    if ($action != 'yourAction')
    {
        parent::_preDispatch($action);
    }
}
 
Thanks for your answers, wasn't aware of that _preDispatch thing.

No I don't really want to use it, guess I will change of controller to perform what I want.
 
Back
Top Bottom