2005-09-06 06:58:02 +00:00
|
|
|
<?php
|
|
|
|
|
2006-05-18 06:49:22 +00:00
|
|
|
$parent_file = 'profile.php';
|
|
|
|
$submenu_file = 'profile.php';
|
2005-09-06 06:58:02 +00:00
|
|
|
require_once('admin.php');
|
|
|
|
|
2006-05-26 23:08:05 +00:00
|
|
|
check_admin_referer('update-profile_' . $user_ID);
|
2005-09-06 06:58:02 +00:00
|
|
|
|
2005-11-16 23:32:38 +00:00
|
|
|
if ( !$_POST )
|
2006-07-05 22:00:03 +00:00
|
|
|
wp_die( __('No post?') );
|
2005-11-16 23:32:38 +00:00
|
|
|
|
2005-09-18 19:44:14 +00:00
|
|
|
$errors = edit_user($user_ID);
|
2005-09-06 06:58:02 +00:00
|
|
|
|
2006-04-02 00:31:26 +00:00
|
|
|
if ( is_wp_error( $errors ) ) {
|
2006-04-02 00:48:14 +00:00
|
|
|
foreach( $errors->get_error_messages() as $message )
|
|
|
|
echo "$message<br />";
|
2005-09-14 00:03:02 +00:00
|
|
|
exit;
|
2005-09-06 06:58:02 +00:00
|
|
|
}
|
|
|
|
|
2005-11-16 23:32:38 +00:00
|
|
|
do_action('personal_options_update');
|
|
|
|
|
2005-09-06 06:58:02 +00:00
|
|
|
if ( 'profile' == $_POST['from'] )
|
|
|
|
$to = 'profile.php?updated=true';
|
|
|
|
else
|
|
|
|
$to = 'profile.php?updated=true';
|
|
|
|
|
|
|
|
wp_redirect( $to );
|
|
|
|
exit;
|
|
|
|
|
2006-04-02 00:31:26 +00:00
|
|
|
?>
|