• Resolved webdome

    (@vait1998)


    Hey,

    we created a template for following notification: “New User Registration – For User”.

    Is is possible to paste a shortcode for a set-password-link or a reset-password link?

    We tried following, but nothing work:
    [password_reset_link]
    [password_url]

    Thanks for your answer, and Best Regards.

Viewing 12 replies - 16 through 27 (of 27 total)
  • Plugin Author bnfw

    (@voltronik)

    Hi @vait1998,
    The notification has been tested with the REST API fairly thoroughly as it is required when working with the Block Editor/Gutenberg.

    You may want to check when you’re hooking into the API to register a user as if it’s done too early or too late, it may not trigger the notification.

    Hi @vait1998
    I’m curious to hear how you solved the issue, because I ran into exactly the same problem. Could you explain how you got the link working?

    Thread Starter webdome

    (@vait1998)

    @kl79sz

    Thanks for your message. You can message me on [email protected]
    Then I can tell you, what I’ve done.

    Thread Starter webdome

    (@vait1998)

    Hi @voltronik ,

    I think the API-hook is correct, because the notification was sent successful. The password reset link was printed too, but the link was invalid.

    Plugin Author bnfw

    (@voltronik)

    Hi @vait1998,
    Ok.

    Are you able to post an example of what the link looks like when using the WP Admin (correct link), and what it looks like when using the API (invalid link)?
    From that, I may be able to suggest where the problem is.

    Thread Starter webdome

    (@vait1998)

    Hi @voltronik

    Here are the two links

    User created over wp-admin:
    https://mysite.com/wp-login.php?action=rp&key=q9Xepas8kTdArxd42TsT&login=presta-test-641%40web-dome.de
    Link works fine

    User created over API:
    https://mysite.com/wp-login.php?action=rp&key=p9pkD1sIyhYZPgn7DJOL&login=presta-test-642%40web-dome.de
    Link gets an error “Error: The password reset link appears to be invalid. Please request a new link below.”

    I can’t see any difference in the links.

    Plugin Author bnfw

    (@voltronik)

    Hi @vait1998,
    How is the password link being generated? Are you modifying this with a filter in some way, either in your API request or another function, or is this information coming from BNFW?

    Thread Starter webdome

    (@vait1998)

    Hi @voltronik

    the password link is being generated with your [password_url] shortcode. There are no other filter. All infos are coming from BNFW

    Plugin Author bnfw

    (@voltronik)

    Hi @vait1998,
    It might be worth checking your code against what is in the WordPress core.

    For reference, BNFW just passes this URL along to the notification and doesn’t have any hand in creating it.

    From experience, if the URL isn’t working it may be because a parameter in your code isn’t being set correctly or something isn’t being sanitised so the URL is being malformed whilst being created.

    Hi,

    Is it possible for the resolution of this to be shared?
    I also have the shortcode [password_url] on a notification for ‘New User – Post Registration Email’.
    I’m creating the user via wpadmin and the link isn’t coming across.

    Thanks!

    Plugin Author bnfw

    (@voltronik)

    Hi @lananas1,
    You may wish to start a new threa for your issue but for now, you cannot use the [password_url] shortcode on the ‘New User – Post Registration Email’. This shortcode can only be used on the ‘New User Registration – For User’ notification.

    Hope this helps.

    thank you!

Viewing 12 replies - 16 through 27 (of 27 total)
  • The topic ‘Shortcode for Set-Password-Url’ is closed to new replies.