WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Plugin API/Action Reference/profile update

This page is marked as incomplete. You can help Codex by expanding it.

Description

This hook allows you to access data for a user immediately after their database information is updated. Two arguments are passed to functions using this hook: "user_id" (int) and "old_user_data" (object).

Usage

<?php

    add_action( 'profile_update', 'my_profile_update', 10, 2 );

    function my_profile_update( $user_id, $old_user_data ) {
        // Do something
    }
?>

Parameters

$user_id
(integer) (optional) The user ID of the user being edited.
Default: None
$old_user_data
(object) (optional) The WP_User object of the user before it was edited.
Default: None

Location

This hook is located in `/wp-includes/user.php`

Related

Action Hooks

Filter Hooks

Return to Plugin API/Action Reference