diff --git a/wp-admin/includes/class-wp-ms-users-list-table.php b/wp-admin/includes/class-wp-ms-users-list-table.php
index da07f35056..c3bfec28e0 100644
--- a/wp-admin/includes/class-wp-ms-users-list-table.php
+++ b/wp-admin/includes/class-wp-ms-users-list-table.php
@@ -171,17 +171,21 @@ class WP_MS_Users_List_Table extends WP_List_Table {
case 'username':
$avatar = get_avatar( $user->user_email, 32 );
- $edit_link = ( get_current_user_id() == $user->ID ) ? 'profile.php' : 'user-edit.php?user_id=' . $user->ID;
+ if ( get_current_user_id() == $user->ID ) {
+ $edit_link = esc_url( network_admin_url( 'profile.php' ) );
+ } else {
+ $edit_link = esc_url( network_admin_url( add_query_arg( 'wp_http_referer', urlencode( stripslashes( $_SERVER['REQUEST_URI'] ) ), 'user-edit.php?user_id=' . $user->ID ) ) );
+ }
echo "
"; ?>
- user_login ); ?>user_login ); ?>user_login, $super_admins ) )
echo ' - ' . __( 'Super Admin' );
?>
' . __( 'Edit' ) . '';
+ $actions['edit'] = '' . __( 'Edit' ) . '';
if ( current_user_can( 'delete_user', $user->ID) && ! in_array( $user->user_login, $super_admins ) ) {
$actions['delete'] = '' . __( 'Delete' ) . '';
diff --git a/wp-admin/user-edit.php b/wp-admin/user-edit.php
index a804f8264c..c3276d6930 100644
--- a/wp-admin/user-edit.php
+++ b/wp-admin/user-edit.php
@@ -147,7 +147,8 @@ if ( !is_multisite() ) {
if ( !is_wp_error( $errors ) ) {
$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);
+ if ( $wp_http_referer )
+ $redirect = add_query_arg('wp_http_referer', urlencode($wp_http_referer), $redirect);
wp_redirect($redirect);
exit;
}
@@ -168,7 +169,7 @@ include (ABSPATH . 'wp-admin/admin-header.php');
|