Skip to content

Commit 3d28e06

Browse files
committed
On initial user creation, pass an empty WP_User obj for the old user data
1 parent 9098796 commit 3d28e06

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/wp-includes/user.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2502,8 +2502,10 @@ function wp_insert_user( $userdata ) {
25022502
$user = new WP_User( $user_id );
25032503

25042504
if ( ! $update ) {
2505+
$old_user_data = new WP_User();
2506+
25052507
/** This action is documented in wp-includes/pluggable.php */
2506-
do_action( 'wp_set_password', $userdata['user_pass'], $user_id, $userdata );
2508+
do_action( 'wp_set_password', $userdata['user_pass'], $user_id, $old_user_data );
25072509
}
25082510

25092511
/**

0 commit comments

Comments
 (0)