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

git-svn-id: http://svn.automattic.com/wordpress/trunk@11441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2009-05-23 21:37:49 +00:00
parent e0a5704c22
commit da5d1d8d15

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;