XenForo + aMember bridge addon

SEHIan

New member
Hi guys,

This is not working with XenForo 1.2.3.
I assume they need to update it to work with this version of XenForo. They probably have, but they just will require me to ask them to send it by email. lol aMember is weird sometimes.

I want to try to update the addon code if it's wrong.. Any ideas?

PHP:
<?php

class Amember_Redirect
{

    static function doRedirect(XenForo_FrontController $fc, XenForo_RouteMatch &$routeMatch)
    {
        if ($fc->getRequest()->isXmlHttpRequest()) return;

        if ($routeMatch->getControllerName() == 'XenForo_ControllerPublic_Account'
            && strpos($routeMatch->getAction(), 'security') === 0) {
            self::redirect('/profile', false);
        }
       
        if ($routeMatch->getControllerName() == 'XenForo_ControllerPublic_Login'
            || $routeMatch->getControllerName() == 'XenForo_ControllerPublic_LostPassword')
        {
            self::redirect('/login');
        }
        if ($routeMatch->getControllerName() == 'XenForo_ControllerPublic_Logout')
        {
            self::redirect('/logout');
        }
    }

    static function redirect($url, $add_back_url = true)
    {
        header("Location: /members$url" . ($add_back_url ? '?' . http_build_query(array(
                    '_amember_redirect_url' => base64_encode(XenForo_Application::get('options')->boardUrl)
                ), '', '&') : ''));
        exit;
    }

}

If you see anything wrong, please advise. When I try to login via amember, i'm not logged into XenForo. Same for all my users. So there must be something in this code that is failing to communicate properly to XenForo.
 
Back
Top Bottom