Pass references and more context to the new 'user_profile_update_errors' hook. Fixes #9302.

git-svn-id: https://develop.svn.wordpress.org/trunk@11441 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2009-05-23 21:37:49 +00:00
parent 9e3a2b0210
commit bd9784b05e

View File

@ -178,8 +178,9 @@ function edit_user( $user_id = 0 ) {
$errors->add( 'email_exists', __('<strong>ERROR</strong>: This email is already registered, please choose another one.'), array( 'form-field' => 'email' ) );
}
do_action('user_profile_update_errors', $errors);
// Allow plugins to return there own errors.
do_action_ref_array('user_profile_update_errors', array ( &$errors, $update, &$user ) );
if ( $errors->get_error_codes() )
return $errors;