Skip to content

Commit f294326

Browse files
committed
Users: Pass WP_User object to wp_set_password action in during new user creation.
After [60634], `wp_set_password` is now fired during new user creation and existing user updates when a password is changed. `wp_set_password` expects the third argument to be a `WP_User` object of the user's data prior to the update. This change simply passes the newly created `WP_User` object. Follow-up to [60634]. Props dd32. See #22114. git-svn-id: https://develop.svn.wordpress.org/trunk@60712 602fd350-edb4-49c9-b593-d223f7449a82
1 parent c15303c commit f294326

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-includes/user.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2515,7 +2515,7 @@ function wp_insert_user( $userdata ) {
25152515

25162516
if ( ! $update ) {
25172517
/** This action is documented in wp-includes/pluggable.php */
2518-
do_action( 'wp_set_password', $userdata['user_pass'], $user_id, $userdata );
2518+
do_action( 'wp_set_password', $userdata['user_pass'], $user_id, $user );
25192519
}
25202520

25212521
/**

0 commit comments

Comments
 (0)