Page Builder Summit Limited Time Offer - 20% OFF! Use coupon PBS20 - View Details



The wsf_action_user_lostpassword_error filter hook runs whenever the User Management add-on encounters an error when trying to process a password reset request. This can be used to provide the user with a more meaningful message from third party plugins.


add_filter( 'wsf_action_user_lostpassword_error', 'my_hook_function', 10, 5 );


  1. $error_message String
    The error message.
  2. $error_id String
    The error ID returned by the get_password_reset_key function.
  3. $form Form Object
    The form object.
  4. $submit Submit Object
    The submit object.
  5. $config Array
    The action configuration array.


// Callback function for the wsf_action_user_lostpassword_error filter hook
function my_hook_function( $error_message, $error_id, $form, $submit, $config ) {
	// Your code here ...

	// Return value
	return $error_message;

// Add a callback function for the wsf_action_user_lostpassword_error filter hook
add_filter( 'wsf_action_user_lostpassword_error', 'my_hook_function', 10, 5 );

Source File

This hook can be found in: <plugin root>/includes/classes/class-ws-form-action-user.php