]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-admin/profile-update.php
Wordpress 2.0.4
[autoinstalls/wordpress.git] / wp-admin / profile-update.php
1 <?php
2
3 require_once('admin.php');
4
5 check_admin_referer('update-profile_' . $user_ID);
6
7 if ( !$_POST )
8         die( __('No post?') );
9
10 $errors = edit_user($user_ID);
11
12 if (count($errors) != 0) {
13         foreach ($errors as $id => $error) {
14                 echo $error . '<br/>';
15         }
16         exit;
17 }
18
19 if ( !isset( $_POST['rich_editing'] ) )
20         $_POST['rich_editing'] = 'false';
21 update_user_option( $current_user->id, 'rich_editing', $_POST['rich_editing'], true );
22
23 do_action('personal_options_update');
24
25 if ( 'profile' == $_POST['from'] )
26         $to = 'profile.php?updated=true';
27 else
28         $to = 'profile.php?updated=true';
29
30 wp_redirect( $to );
31 exit;
32
33 ?>