mirror of
git://develop.git.wordpress.org/
synced 2025-01-18 05:18:42 +01:00
Pass old user data to profile_update action. Props AaronCampbell. fixes #7784
git-svn-id: https://develop.svn.wordpress.org/trunk@8969 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d9c4380549
commit
389969dfa8
@ -109,6 +109,7 @@ function wp_insert_user($userdata) {
|
||||
if ( !empty($ID) ) {
|
||||
$ID = (int) $ID;
|
||||
$update = true;
|
||||
$old_user_data = get_userdata($ID);
|
||||
} else {
|
||||
$update = false;
|
||||
// Hash the password
|
||||
@ -199,7 +200,7 @@ function wp_insert_user($userdata) {
|
||||
wp_cache_delete($user_login, 'userlogins');
|
||||
|
||||
if ( $update )
|
||||
do_action('profile_update', $user_id);
|
||||
do_action('profile_update', $user_id, $old_user_data);
|
||||
else
|
||||
do_action('user_register', $user_id);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user