• Hello dear developer,
    I have installed your plugin (and I thank you for it) and it works.

    I would like to make a small change…

    If i am right, WP takes a (newly or not) registered user to the edit profile page. And thanks to your plugin, the user is obliged to change its password at the first connexion…and that’s nice.

    What I’d need is to redirect a ‘fully’ registered user (I mean, a user who has changed its first password) to the home page instead of the edit profile page.

    I have na?vely tried to add else {wp_redirect(home_url());exit} in your custom redirect function but the redirection failed…

    Would you have an idea please?
    Thank you in advance
    Pierre

    https://www.ads-software.com/plugins/force-password-change/

Viewing 1 replies (of 1 total)
  • Thread Starter bastringue

    (@bastringue)

    Hello all ! I got it
    Pb : I wanted to use this plugin but I wanted to redirect towards a front-end page (and not the admin page for changing profile).
    Solution: The first stage is to redirect to a customized front page. The actual plugin cannot do this and the reason is the following : if you try to go to a page with a template which is not the admin template, you generate an infinite loop because the redirect is hooked on a template-change event. So if you want to go to a customized page “mypage.php”, you need associate this page to a specific template “specTemplate.php” and you need to add this in the ‘redirect’function :
    if (basename( get_page_template() ) != ‘specTemplate.php’) {
    wp_redirect(home_url(‘/mypage/’));
    exit();
    }

    The second stage consists in adding all the items of the edit profile form (in particular, the password stuff) and correctly POST these information (on submit) towards the correct admin function. This is feasible and many solution exist (I will come back to let one here or to give a link when done)

    If you have this missing part, you can leave it here…

Viewing 1 replies (of 1 total)
  • The topic ‘Need help please for a correct "wp-redirect"’ is closed to new replies.