• Resolved Vincent Poirier

    (@magikweb)


    Hello,
    This plugin is marvelous so far, the only issue I have is to redirect after login (to a different site). I tested the following code (2 tests), but upon logging in, the user is redirected to the homepage.

    function pugs_after_auth($wp_user, $exlog_user_data) {
        wp_redirect( 'myurlhere?username=' . $exlog_user_data['user_login'] );
        exit;
    }
    add_action('exlog_hook_action_authenticated', 'pugs_after_auth', 10, 2);
    
    add_filter( 'login_redirect', function( $url, $query, $user ) {
    	return 'https://google.ca';
    }, 10, 3 );

    Anyone knows if I’m forgetting something?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author tbenyon

    (@tbenyon)

    Hey @magikweb,

    Really sorry about the long delay. Life’s been busy.

    The good news is that I’ve found the problem and I’m going to add a feature in that will handle the work for you.

    It’s not an issue with the plugin. Basically external domains are blocked by WordPress by default.

    Can you confirm you’re still interested in this feature and I’ll prioritise getting it into the plugin.

    Thanks for your patience,

    Tom

    Thread Starter Vincent Poirier

    (@magikweb)

    Hello Tom,
    Yeah, it’s not critical for our project, but we’d definitely use that feature instead of applying a bunch of workarounds. ??

    Plugin Author tbenyon

    (@tbenyon)

    Cool. I’ll try and get it deployed this weekend.

    Feel free to chase me ??

    Plugin Author tbenyon

    (@tbenyon)

    Hey @magikweb,

    This update is now deployed – let me know if this works for you.

    If it’s looking good your end, I’d be grateful if you could write a review or buy me a beer ??

    Thanks,

    Tom

    ??

    Thread Starter Vincent Poirier

    (@magikweb)

    Awesome, I’ll give it a shot within a few weeks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Redirection after login’ is closed to new replies.