user_profile_update_errors – profile still updating with errors
-
Hello,
The problem I’m having is that the user profile page is allowing users to update their profile even when Errors are returned. I’m hooking into user_profile_update_errors, which correctly displays the errors, however the erred changes are still applied to the profile.
How can I prevent the changes from being applied if there is an error?
Thanks
Below is an example of what I’m using –
function tml_profile_errors( $errors ) { if ( empty( $_POST['state'] ) ) $errors->add( 'empty_missing_', '<strong>ERROR</strong>: Please enter your state.' ); return $errors; } add_filter( 'user_profile_update_errors', 'tml_profile_errors' );
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘user_profile_update_errors – profile still updating with errors’ is closed to new replies.