]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/profile-update.php
Wordpress 2.3.2
[autoinstalls/wordpress.git] / wp-admin / profile-update.php
index 90913dfb432b817860fc5b57d50601193f2f36fe..c74621b48f45fa13c22be04f671c38509f6d1e10 100644 (file)
@@ -1,25 +1,22 @@
 <?php
 
+$parent_file = 'profile.php';
+$submenu_file = 'profile.php';
 require_once('admin.php');
 
 check_admin_referer('update-profile_' . $user_ID);
 
 if ( !$_POST )
-       die( __('No post?') );
+       wp_die( __('No post?') );
 
 $errors = edit_user($user_ID);
 
-if (count($errors) != 0) {
-       foreach ($errors as $id => $error) {
-               echo $error . '<br/>';
-       }
+if ( is_wp_error( $errors ) ) {
+       foreach( $errors->get_error_messages() as $message )
+               echo "$message<br />";
        exit;
 }
 
-if ( !isset( $_POST['rich_editing'] ) )
-       $_POST['rich_editing'] = 'false';
-update_user_option( $current_user->id, 'rich_editing', $_POST['rich_editing'], true );
-
 do_action('personal_options_update');
 
 if ( 'profile' == $_POST['from'] )
@@ -30,4 +27,4 @@ else
 wp_redirect( $to );
 exit;
 
-?>
\ No newline at end of file
+?>