Viewing 2 replies - 1 through 2 (of 2 total)
  • Starting with version 1.7.6, you can do it by using the new **cl_login_redirect_url** filter I added.

    /**
     * Adds the filer to alter the redirect URL dynamically.
     * 
     * @param string redirect_url The original redirect URL.
     * @param object user The object describing the user who logged in.
     * @return string The new redirect URL.
     * @author Aelia <[email protected]>
     */
    add_filter('cl_login_redirect_url', function($redirect_url, $user) {
      // Call your custom redirect function to alter the URL dymamically
      // and return it
      returnmy_login_redirect($redirect_url, $_REQUEST, $user);
    }, 10, 2);

    Hi there- I am trying to use this filter in order to make it so that after a person logs in, the page that they were previously viewing before they logged in is then displayed again. I have created a “child” version of the Clean-login plugin by copying/pasting the top portion of the code from
    clean-login.php file into a new .php file that I named “clean-login-my edits.php” I then placed the code of this filter in my new .php file but now I don’t know what code I need to change in this filter to make the redirection go to the previous page that the person was vowing before they logged in.

    Can anyone please tell me

    1. Have I created the child version of the plugin correctly?

    2. What to do with this filter (add code or change code) in order to make the redirection go back to the previous page that was being viewed before a person logins in?

    Any help is much appreciated!!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Custom login redirect integration’ is closed to new replies.