Straighten out user_id/user_ID conflict. Don't make user_id global in get_currentuserinfo() because it stomps on the local user_id in user-edit.
git-svn-id: http://svn.automattic.com/wordpress/trunk@2644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f220786deb
commit
2c44f33f78
|
@ -68,14 +68,14 @@ $new_description = $_POST['new_description'];
|
|||
|
||||
$result = $wpdb->query("UPDATE $wpdb->users SET user_login = '$new_user_login', $updatepassword user_email='$new_email', user_url='$new_url', user_nicename = '$new_nicename', display_name = '$display_name' WHERE ID = '$user_id'");
|
||||
|
||||
update_usermeta( $user_ID, 'first_name', $new_firstname );
|
||||
update_usermeta( $user_ID, 'last_name', $new_lastname );
|
||||
update_usermeta( $user_ID, 'nickname', $new_nickname );
|
||||
update_usermeta( $user_ID, 'description', $new_description );
|
||||
update_usermeta( $user_ID, 'icq', $new_icq );
|
||||
update_usermeta( $user_ID, 'aim', $new_aim );
|
||||
update_usermeta( $user_ID, 'msn', $new_msn );
|
||||
update_usermeta( $user_ID, 'yim', $new_yim );
|
||||
update_usermeta( $user_id, 'first_name', $new_firstname );
|
||||
update_usermeta( $user_id, 'last_name', $new_lastname );
|
||||
update_usermeta( $user_id, 'nickname', $new_nickname );
|
||||
update_usermeta( $user_id, 'description', $new_description );
|
||||
update_usermeta( $user_id, 'icq', $new_icq );
|
||||
update_usermeta( $user_id, 'aim', $new_aim );
|
||||
update_usermeta( $user_id, 'msn', $new_msn );
|
||||
update_usermeta( $user_id, 'yim', $new_yim );
|
||||
|
||||
header("Location: user-edit.php?user_id=$user_id&updated=true");
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
if ( !function_exists('get_currentuserinfo') ) :
|
||||
function get_currentuserinfo() {
|
||||
global $user_login, $userdata, $user_level, $user_ID, $user_id, $user_email, $user_url, $user_pass_md5, $user_identity;
|
||||
global $user_login, $userdata, $user_level, $user_ID, $user_email, $user_url, $user_pass_md5, $user_identity;
|
||||
|
||||
if ( !isset($_COOKIE['wordpressuser_' . COOKIEHASH]))
|
||||
return false;
|
||||
|
@ -15,7 +15,6 @@ function get_currentuserinfo() {
|
|||
$userdata = get_userdatabylogin($user_login);
|
||||
$user_level = $userdata->user_level;
|
||||
$user_ID = $userdata->ID;
|
||||
$user_id = $userdata->ID;
|
||||
$user_email = $userdata->user_email;
|
||||
$user_url = $userdata->user_url;
|
||||
|
||||
|
|
Loading…
Reference in New Issue