From da5d1d8d15db9bf401901c7f9dbdef4cf4f10f94 Mon Sep 17 00:00:00 2001 From: westi Date: Sat, 23 May 2009 21:37:49 +0000 Subject: [PATCH] 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 --- wp-admin/includes/user.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/user.php b/wp-admin/includes/user.php index 3896bca918..ec158669e3 100644 --- a/wp-admin/includes/user.php +++ b/wp-admin/includes/user.php @@ -178,8 +178,9 @@ function edit_user( $user_id = 0 ) { $errors->add( 'email_exists', __('ERROR: 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;