Title: Creating the password-setting link by code
Last modified: August 30, 2016

---

# Creating the password-setting link by code

 *  Resolved [uncovery](https://wordpress.org/support/users/uncovery/)
 * (@uncovery)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/creating-the-password-setting-link-by-code/)
 * When a asks for a password reset on wordpress, they used to get a password emailed(
   before 4.2 or 4.3 IIRC). Today, they are getting a link instead that allows them
   to set a password.
 * What is the way to create this kind of link with PHP?
 * Thanks!

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

 *  [Gary Pendergast](https://wordpress.org/support/users/pento/)
 * (@pento)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/creating-the-password-setting-link-by-code/#post-6851253)
 * Hi [@uncovery](https://wordpress.org/support/users/uncovery/)!
 * There isn’t a function to generate that link for you, but you can see how it’s
   done in core here:
 * [https://core.trac.wordpress.org/browser/tags/4.4/src/wp-includes/pluggable.php#L1724](https://core.trac.wordpress.org/browser/tags/4.4/src/wp-includes/pluggable.php#L1724)
 * The relevant parts are lines 1766-1777 to set up the password reset, and line
   1781 generates the link.
 *  Thread Starter [uncovery](https://wordpress.org/support/users/uncovery/)
 * (@uncovery)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/creating-the-password-setting-link-by-code/#post-6851255)
 * Thanks a lot, this is very helpful!

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

The topic ‘Creating the password-setting link by code’ is closed to new replies.

## Tags

 * [email](https://wordpress.org/support/topic-tag/email/)
 * [link](https://wordpress.org/support/topic-tag/link/)
 * [password](https://wordpress.org/support/topic-tag/password/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 2 replies
 * 2 participants
 * Last reply from: [uncovery](https://wordpress.org/support/users/uncovery/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/creating-the-password-setting-link-by-code/#post-6851255)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
