WordPress.org

Codex

Plugin API/Action Reference/user profile update errors

Parameters

  • &$errors - Errors object to add any custom errors to
  • $update - true if updating an existing user, false if saving a new user
  • &$user - User object for user being edited

On return, if the errors object contains errors then the save is not completed & the errors displayed to the user.

Example usage

function check_fields($errors, $update, $user) {
	$errors->add('demo_error',__('This is a demo error, and will halt profile save'));
}
add_filter('user_profile_update_errors', 'check_fields', 10, 3);

Location

This hook can be found in wp-admin/includes/user.php

This page is marked as incomplete. You can help Codex by expanding it.

Return to Plugin API/Filter Reference