2005-09-06 02:58:02 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require_once('admin.php');
|
|
|
|
|
2006-05-02 18:36:06 -04:00
|
|
|
check_admin_referer('update-profile' . $user_ID);
|
2005-09-06 02:58:02 -04:00
|
|
|
|
2005-11-16 18:32:38 -05:00
|
|
|
if ( !$_POST )
|
|
|
|
die( __('No post?') );
|
|
|
|
|
2005-09-18 15:44:14 -04:00
|
|
|
$errors = edit_user($user_ID);
|
2005-09-06 02:58:02 -04:00
|
|
|
|
2006-04-01 19:31:26 -05:00
|
|
|
if ( is_wp_error( $errors ) ) {
|
2006-04-01 19:48:14 -05:00
|
|
|
foreach( $errors->get_error_messages() as $message )
|
|
|
|
echo "$message<br />";
|
2005-09-13 20:03:02 -04:00
|
|
|
exit;
|
2005-09-06 02:58:02 -04:00
|
|
|
}
|
|
|
|
|
2005-11-16 18:32:38 -05:00
|
|
|
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');
|
|
|
|
|
2005-09-06 02:58:02 -04:00
|
|
|
if ( 'profile' == $_POST['from'] )
|
|
|
|
$to = 'profile.php?updated=true';
|
|
|
|
else
|
|
|
|
$to = 'profile.php?updated=true';
|
|
|
|
|
|
|
|
wp_redirect( $to );
|
|
|
|
exit;
|
|
|
|
|
2006-04-01 19:31:26 -05:00
|
|
|
?>
|