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