Support » Plugin: Ajax BootModal Login » about redirect link after login

  • Hey,

    Thank you very much for sharing this plugin. It’s very useful for my site. But may I ask that how can I custom the redirect link? Currently the page will be redirected to admin panel after login. But I need to let users staying on the same page before they logging in. I tried to add a hidden “redirect_to” input filed to login_form template and add filter in my theme’s function.php file. But seems It’s not working… Could you please give me some advise? Thank you very much.

    The question is solved. Just ignore it. 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi, would you mind sharing how you solved this?

    Thank you very much.

    Thread Starter kuma275m

    (@kuma275m)

    @pcarguy22

    Hey,

    Whcih version are you using now? I’m using version 1.0.3 and don’t update since I made too much modification to this plugin….
    But basically, I added a hidden input area in login-form.php :
    <input type=”hidden” name=”redirect_to” id=”redirect_to” value=”<?php echo $_SERVER[‘REQUEST_URI’]; ?>” /> to store current page url.

    then in alimir-bootmodal-login.php:
    under alimir_bootModal_ajax_login function, modify original code around line 122 to this:
    else{
    echo json_encode(array(‘loggedin’=>true, ‘redirect_to’=>”.$redirect_to.”, ‘message’=>'<p class=”alert alert-success” data-alert=”alert”>some codes….</p>’));
    }

    This is what I do…I’m not sure if it will help you but hope to provide some idea to solve your issue….

    BR

    You really helped me, thank you.

    I am using the latest version: 1.2.2

    I added:

    <input type="hidden" name="redirect_to" id="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>" />

    to the plugin’s login-form.php

    Then in authenticate.php, I changed line 17 to:

    'loginRedirectURL' =>''.$redirect_to.'',

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘about redirect link after login’ is closed to new replies.