WordPress filter hook · part of WordPress core
lostpassword_errors
A WordPress core filter that 9 plugins also fire themselves, running on 54K+ sites between them.
“Filters the errors encountered on a password reset request.”
How to use lostpassword_errors
It's a filter: your callback receives the value and 1 more argument, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'lostpassword_errors', function( $errors, $user ) {
// Change $errors here.
return $errors;
}, 10, 2 );Argument names come from Fluent Support's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
This hook is fired by WordPress core too. Official reference on developer.wordpress.org →
9 plugins that fire lostpassword_errors
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
Login & Register Customizer30,000+ installs
apply_filters( 'lostpassword_errors', $errors, $user_data )includes/class-xoo-el-form-handler.php:921 -
FluentAuth10,000+ installs
apply_filters( 'lostpassword_errors', $errors, $user_data )app/Hooks/Handlers/CustomAuthHandler.php:1093 -
Fluent Support10,000+ installs
apply_filters( 'lostpassword_errors', $errors, $user )app/Modules/Auth/AuthController.php:337 -
Easy Post Submission4,000+ installs
apply_filters( 'lostpassword_errors', $this->errors, null )includes/account-shortcodes.php:556 -
BoxCart50+ installs
apply_filters( 'lostpassword_errors', $errors, $user )includes/frontend/class-boxcart-account.php:1723 -
User Registration & Login50+ installs
apply_filters( 'lostpassword_errors', $errors, $candidate )includes/class-sav-frontend.php:3638 -
Easy Membership and MagazineFewer than 10 installs
apply_filters( 'lostpassword_errors', $errors, $user_data )template/forgot-password.php:145 -
DolphyFewer than 10 installs
apply_filters( 'lostpassword_errors', $errors, $user )hooks/ajax/access.php:72 -
Safety PasswordsFewer than 10 installs
apply_filters( 'lostpassword_errors', $errors, $user )src/Controller.php:300
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.