Description
The wsf_action_user_signon_error filter hook runs whenever the User Management add-on encounters an error when trying to login a user. This can be used to provide the user with a more meaningful message from third party plugins.
Usage
add_filter( 'wsf_action_user_signon_error', 'my_hook_function', 10, 5 );
Parameters
Example
// Callback function for the wsf_action_user_signon_error filter hook function my_hook_function( $error_message, $error_id, $form, $submit, $config ) { // Check the error ID switch( $error_id ) { // Example that detects Fortress rate limited error ID case 'snicco_fortress.rate_limited' : $error_message = __( 'You have tried to login too many times' ); break; } // Return value return $error_message; } // Add a callback function for the wsf_action_user_signon_error filter hook add_filter( 'wsf_action_user_signon_error', 'my_hook_function', 10, 5 );
Source File
This hook can be found in:<plugin root>/includes/classes/class-ws-form-action-user.php