profile_update WordPress Action Hook

Profile update is a WordPress hook that is fired when a user updates their profile. It is one of the most important hooks in WordPress because it allows plugins and themes to update their data when a user updates their profile. This hook is also used by the WordPress core to update the user's meta data.

do_action( 'profile_update', int $user_id, WP_User $old_user_data, array $userdata ) #

Fires immediately after an existing user is updated.


Parameters

$user_id

(int)User ID.

$old_user_data

(WP_User)Object containing user's data prior to update.

$userdata

(array)The raw array of data passed to wp_insert_user().


Top ↑

Source

File: wp-includes/user.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.8.0The $userdata parameter was added.
2.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More