Skip to content

Commit 1f7bcc7

Browse files
committed
Make sure role is set when updating. Props Mark Jaquith. fixes WordPress#2817
git-svn-id: https://develop.svn.wordpress.org/trunk@3865 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 4d93924 commit 1f7bcc7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

wp-includes/registration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function wp_insert_user($userdata) {
102102
update_usermeta( $user_id, 'aim', $aim );
103103
update_usermeta( $user_id, 'yim', $yim );
104104

105-
if ( $update ) {
105+
if ( $update && isset($role) ) {
106106
$user = new WP_User($user_id);
107107
$user->set_role($role);
108108
}

0 commit comments

Comments
 (0)