Add mutation to send password reset email #491
Labels
Status: In Review
Needs to be reviewed by a project maintainer before merge
Type: Enhancement
New feature or request
Type: Feature
The intent of this mutation is to mimic WP's
retrieve_password()
function that runs when the "Lost Password" form is submitted: https://cloudup.com/cDFg7wCo1igI envision it working like this:
sendPasswordResetEmail
mutation is used and accepts that username/password as an argument.sendPasswordResetEmail
gets the user, calls WP'sget_password_reset_key()
, which generates a password reset hash, stores it as theuser_activation_key
for that user in the database, then returns the key.domain.com/wp-login.php?action=rp&key=12345&login=myusername
. Both the email subject and body are filterable, though, so the password reset link can easily be filtered to point to the frontend URL for a headless WP site instead, for instance.The text was updated successfully, but these errors were encountered: