<html lang="pt-br" dir="ltr"><head></head><body>### [wpforms_user_registration_process_login_process_wp_error_message](https://wpforms.com/developers/wpforms_user_registration_process_login_process_wp_error_message/)

**Published:** March 19, 2020
**Author:** Editorial Team

**Excerpt:** The wpforms_user_registration_process_login_process_wp_error_message filter is used to show a message when using the User Registration addon and the login fails.

**Content:**

## Description

The `wpforms_user_registration_process_login_process_wp_error_message` filter used to provide a message on User Registration addon if the login fails.

## Parameters

$msg*(string)* Message that displays if the login failed.## Source

`wpforms-user-registration/src/Process/Login.php`

## More Information

The filter is used to display a message if the login fails for any reason.

## Example

```

/**
 * Login failed.
 *
 * @link    https://wpforms.com/developers/wpforms_user_registration_process_login_process_wp_error_message/
 *
 * @param   string   $msg  Message that displays if login fails.
 * @return  string
 */

function wpf_dev_user_registration_login_error( $msg ) {
 
        // This is the message that would appear in the email
    $msg = __('Sorry something went wrong! ', 'text-domain');
	$msg .= '';
	$msg .= __('Would you like to reset your password?', 'text-domain');
	$msg .= '';
 
    return $msg;
}
 
add_filter( 'wpforms_user_registration_process_login_process_wp_error_message', 'wpf_dev_user_registration_login_error', 10, 2 );

```

## Reference Articles

[How to Change Validation Messages for User Registration Addon](https://wpforms.com/developers/change-validation-messages-for-user-registration-addon/ "How to Change Validation Messages for User Registration Addon")

**Categories:** Filters Hooks

**Tags:** PHP, User Registration Addon

---

</body></html>