Opened 4 hours ago
#50062 new defect (bug)
Updating user extra fields.
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | major | Version: | 5.4 |
Component: | Users | Keywords: | |
Focuses: | Cc: |
Description
Hi in creating a plugin i have extra fields in the users profile. I can add these at registration and even as a new user from administration panel but this does not work when updating the user.
I am using the hook 'edit_user_created_user' in the file
wp-admin/includes/user.php lines 227 - 242
if ( $update ) { $user_id = wp_update_user( $user ); } else { $user_id = wp_insert_user( $user ); $notify = isset( $_POST['send_user_notification'] ) ? 'both' : 'admin'; /** * Fires after a new user has been created. * * @since 4.4.0 * * @param int $user_id ID of the newly created user. * @param string $notify Type of notification that should happen. See wp_send_new_user_notifications() * for more information on possible values. */ do_action( 'edit_user_created_user', $user_id, $notify );<------ THIS LINE } <------SHOULD BE HERE
If the do action is moved down one line then it will work for new users and updating users.
I think that is correct.
Thank you
Simon
Note: See
TracTickets for help on using
tickets.