diff --git a/wp-admin/profile.php b/wp-admin/profile.php
index 2beb29ceb6..031ca6b2ac 100644
--- a/wp-admin/profile.php
+++ b/wp-admin/profile.php
@@ -1,198 +1,4 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/wp-admin/user-edit.php b/wp-admin/user-edit.php
index 270619a3ea..7365d15cc7 100644
--- a/wp-admin/user-edit.php
+++ b/wp-admin/user-edit.php
@@ -1,8 +1,57 @@
+
+ID;
+ } else {
+ wp_die(__('Invalid user ID.'));
+ }
switch ($action) {
case 'switchposts':
@@ -33,10 +87,14 @@ check_admin_referer('update-user_' . $user_id);
if ( !current_user_can('edit_user', $user_id) )
wp_die(__('You do not have permission to edit this user.'));
+if ( $is_profile_page ) {
+ do_action('personal_options_update');
+}
+
$errors = edit_user($user_id);
if( !is_wp_error( $errors ) ) {
- $redirect = "user-edit.php?user_id=$user_id&updated=true";
+ $redirect = ($is_profile_page? "profile.php?" : "user-edit.php?user_id=$user_id&"). "updated=true";
$redirect = add_query_arg('wp_http_referer', urlencode($wp_http_referer), $redirect);
wp_redirect($redirect);
exit;
@@ -54,7 +112,7 @@ include ('admin-header.php');
@@ -71,9 +129,9 @@ include ('admin-header.php');