Make WordPress Core

Opened 12 months ago

Last modified 11 months ago

#58917 new defect (bug)

Email Sending validation doesn't occur when password reset is sent from the Users page

Reported by: rajinsharwar's profile rajinsharwar Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Users Keywords: has-patch needs-testing
Focuses: Cc:

Description

Suppose my site isn't configured to send emails. So, when a user tries to reset his password from the public login page, he gets the below error.

https://prnt.sc/q_Z3IIC1f_dy

This is expected, but now, if I log in as an admin account, navigate under the Users page, and try to send the reset link for that user, I can see no validation error. The email doesn't get sent in real, but I can't see the error that my site isn't configured for sending emails.

https://prnt.sc/O9k_QpycwCfh

I think this type of behaviour is kind of confusing for users. We should show that validation error in the admin panel as well.

Change History (5)

#1 @audrasjb
12 months ago

  • Version trunk deleted

#2 @audrasjb
12 months ago

  • Component changed from Application Passwords to Users

This ticket was mentioned in PR #4921 on WordPress/wordpress-develop by @rajinsharwar.


12 months ago
#3

  • Keywords has-patch added

Checking if Email Sending is possible, and showing appropriate admin notices when a password reset is requested from the Users page.

Trac ticket: https://core.trac.wordpress.org/ticket/58917

#4 @rajinsharwar
12 months ago

I am now storing a transient flag "reset_password_email_failure" when the email sending fails, and then we check for this transient on the Users page to display the error message. The transient is set to expire in 60 seconds to ensure that the error message is only shown once after the email sending failure.

#5 @rajinsharwar
11 months ago

  • Keywords needs-testing added
Note: See TracTickets for help on using tickets.