WordPress.org

Ready to get started?Download WordPress

Forums

WP-Members
[resolved] Link to reset forgotten password is missing from login/registration page (4 posts)

  1. DonaldScott
    Member
    Posted 1 year ago #

    Hello -

    The members area page, which can be inserted using the following shortcode:

    [wp-members page="members-area"]

    includes a link to reset a forgotten password.

    However, the initial login/registration page, which is displayed when the user attempts to access a blocked page/post, does not include the link to reset a forgotten password.

    The link to reset a forgotten password should be displayed on both pages: on the login/registration page (where it is currently missing) and on the "members area" page displayed using the shortcode (where it is currently present).

    Is it possible to add the "reset password" link to the main login/registration page?

    Thanks.

    http://wordpress.org/extend/plugins/wp-members/

  2. Chad Butler
    Member
    Plugin Author

    Posted 1 year ago #

    If you tell the plugin the location of the members-area page (better yet, use "user-profile" as the shortcode) in the plugin's options, it can add the forgot password link to all login forms.

    Likewise, if you specify the location of the registration page (if you are using one; it is optional), it would add a register link as well.

    This is covered in the user guide:
    http://rocketgeek.com/plugins/wp-members/users-guide/plugin-settings/options/
    http://rocketgeek.com/plugins/wp-members/users-guide/

  3. DonaldScott
    Member
    Posted 1 year ago #

    Thank you, the Login form now displays the 'Forgot password' link.

    Also it displays the 'Register' link.

    Everything is almost perfect now, except for one tiny (but important) problem with the workflow:

    If I check 'Turn off registrations' (the only way I can find to avoid redundantly displaying the Registration Form under the Login Form - which now has a Register link), then a new (non-registered) user, after registering, is no longer redirected to the protected content they were trying to access - they are redirected to the home page.

    Is there any way to redirect a new user to the protected content they were trying to access (instead of to the home page) in the case where they accessed the Registration Page by clicking on the Register link under the Login Form (which was displayed when they first attempted to access the protected content)?

    This might sound like a highly specific use-case (because it takes a long time to describe) - but actually it is probably the most common one:
    - a new user tries to access protected content,
    - gets redirected to the Login Form,
    - clicks on the Register link,
    - registers,
    - logs in...

    - and now they should ideally be redirected to the content they were originally trying to access, not to the home page.

    How is the redirect done (where is the code or hook?) after an existing user tries to access protected content and simply does a login? This is currently being redirected correctly (to the protected content they were trying to access, not to the home page).

    I just need a way to do this for a new user also - after the sequence:
    - Login Page
    - Register Page
    - Login
    ... redirecting them to the protected content (not to the home page).

    There is a longer (equivalent) presentation of this question here as well:

    http://wordpress.org/support/topic/forgot-password-link-is-present-on-members-area-page-but-missing-on-signup

    I suppose the code "remembers" the (protected) URL which an existing (non-logged-in) user was trying access, and then redirects them there after login.

    It would be great to know where the code is doing this - to see if it ould also be applied to a new user, so that the code can also "remember" that URL and redirect them there, after the (lengthier) process of visiting the Login Page, clicking the Register link, visiting the Register Page, then finally logging in.

  4. DonaldScott
    Member
    Posted 1 year ago #

    It seems that if a new user tried to access blocked content, then clicked on the Register link under the Login form, and I wanted to redirect them to the blocked content after they registered and logged in, I would need to do a ("chained"?) sequence of two redirects

    So it seems like I first would need to do the following:

    http://rocketgeek.com/plugins/wp-members/users-guide/filter-hooks/wpmem_register_redirect/

    and then do the following:

    http://rocketgeek.com/plugins/wp-members/users-guide/filter-hooks/wpmem_login_redirect/

    Is this correct?

    Is this doable? ("Chaining" two redirects?)

    If so, where would I put this code? I guess it would go in the function where they first attempted to access the blocked content.

    Your documentation is great by the way. I'm just starting to explore it, but it seems much better than what many PHP programmers provide. (Not my best language, but I can read it and maybe hack it a bit.)

    So now I'm thinking of the following approach:

    (1) Find the procedure where the user attempts to access blocked content.

    (2) Redirect them to the Login form here.

    (3) Let the user click on the Register link (under the Login form).

    (4) Let them log in.

    (5) This whole time, remember the URL of the blocked content, and redirect them there.

    I'm not sure if this is too complicated, because the user is going through a series of pages (attempt to access blocked content, redirect to Login form, click Register link, register, login - and then finally get redirected to blocked content).

    Maybe this involves too many redirects, which might interfere with other redirects already in the code.

    However, this seems like a very typical use case: new user trying to access blocked content, redirected to Login form, clicks Register link, registers, logs in... then they should ideally be redirected to the blocked content.

    Its a lengthy chain of clicks and redirects but it is also a very typical use case, so I hope there is a way to do it!

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.