[wp-trac] [WordPress Trac] #34281: Allow admins to send users a 'Reset Password' link
WordPress Trac
noreply at wordpress.org
Tue Oct 13 17:20:25 UTC 2015
#34281: Allow admins to send users a 'Reset Password' link
--------------------------+------------------------------
Reporter: Ipstenu | Owner: adamsilverstein
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: Users | Version: trunk
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: javascript
--------------------------+------------------------------
Comment (by adamsilverstein):
[attachment:34281.diff] is a first pass. Notes:
* Built off of code provided by @Ipstenu - thanks!
* I'm leveraging the existing `retrieve_password` function to avoid
duplicating code and allow existing password reset hooks to work as
expected. To accomplish this I moved the function from wp-login.php to wp-
includes/functions.php - otherwise the function is not available in this
context. Feedback appreciated.
Things that would be nice to add:
* The ability to trigger password resets as a bulk action from the user
list screen.
* Extending `retrieve_password` to accept a user_login argument.
Currently, I'm setting up `$_POST['user_login']` because thats what the
function expects. That feels wrong, it would be cleaner if I could pass
the user_login to the function directly.
* Unit tests.
Would appreciate feedback on the UI as well, especially the success (or
error) message inserted.
Screenshots:
Reset button:
[[Image(http://cl.ly/image/2V3X3E1J3b3V/Image%202015-10-13%20at%2011.16.28%20AM.png)]]
After reset:
[[Image(http://cl.ly/image/1N430K3N1K2Q/Edit_User__sadasd__WordPress_2015-10-13_11-15-39.jpg)]]
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34281#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list