mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-01 21:21:24 +01:00
Pass old user data to profile_update action. Props AaronCampbell. fixes #7784
git-svn-id: http://svn.automattic.com/wordpress/trunk@8969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c9cad6e514
commit
249b648c34
@ -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…
Reference in New Issue
Block a user