Redirect users back to the current page does not work when using with ThemeMyLogin

edited April 2015 in WordPress
Hi. I'm using OneAll combined with ThemeMyLogin.

ThemeMyLogin uses wordpress page "/login/" for login. It is possible to go back to the previous page after logging in with TML
So for instance if you go to /login/ from a blog post, logging in takes you back to the blog post.

Through the OneAll settings, I can make the user go to homepage after Login, but if I have the setting "Redirect users back to the current page", it goes to the /login/ page which in turn goes to /your-profile/...I don't want this.

I want it to bypass this /login/ page and say, if I'm browsing a blog post, go to /login/ - login with Oneall, and then it goes back to the blog post.

I understand that Oneall assumes we're logging in through wp-login.php, so it might be getting confused by how TML works (which uses Wordpress pages and shortcodes to have the login/register on the site itself rather than through wp-admin)

BASICALLY TL;DR - How can I make oneall go two pages back in functions.php?

I have it set up like this currently for user after login to go homepage.
I want it to go two pages back in page history. Is this possible?
add_filter('oa_social_login_filter_login_redirect_url', 'my_login_registration_redirect_filter2', 10, 2);

function my_login_registration_redirect_filter2 ($url, $user_data) {
$url = "http://www.homepage.com/";
return $url;
    
}

    Welcome!

    Please sign in to your OneAll account to ask a new question or to contribute to the discussions.

    Please click on the link below to connect to the forum with your OneAll account.