[wp-trac] [WordPress Trac] #51924: Add a filter hook to manipulate $user_data variable on retrieve_password() function

WordPress Trac noreply at wordpress.org
Tue Dec 22 11:48:03 UTC 2020


#51924: Add a filter hook to manipulate $user_data variable on retrieve_password()
function
-----------------------------------------+------------------------------
 Reporter:  marcelo2605                  |       Owner:  johnbillion
     Type:  feature request              |      Status:  reviewing
 Priority:  normal                       |   Milestone:  Awaiting Review
Component:  Login and Registration       |     Version:
 Severity:  normal                       |  Resolution:
 Keywords:  has-patch reporter-feedback  |     Focuses:  administration
-----------------------------------------+------------------------------

Comment (by marcelo2605):

 Thanky for the reply @johnbillion!

 I'm working on a website where most of the target audience doesn't have an
 email account and for them we will use SMS notifications. So, in the
 register form, I created a field to store the phone number and,
 internally, I generate a fake email address using this phone number and
 the webiste domain.

 To authenticate the phone number in the login form, I'm using the
 [https://developer.wordpress.org/reference/hooks/authenticate/
 authenticate] filter, receiving the phone number in the `$username`
 variable.

 But I need a similar filter to validate the phone number in the lost
 password form. That why I'm doing this suggestion. I recognize that is a
 specific situation, but I believe this filter could give more control over
 the lost password form.

 Regarding the `$_POST`, I made a new commit removing it from the filter
 hook.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51924#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list