---
title: "rcp_user_profile_updated"
source: "https://docs.nexcess.com/software/kadence/restrict-content-pro/rcp_user_profile_updated/"
description: "Coming soon: Restrict Content Pro is becoming Kadence Memberships. You may see both names used while we update the product, documentation, and customer experien…"
vertical: "Software"
area: "Restrict Content Pro"
date: "2023-04-20"
last_modified: "2026-08-19"
---

# rcp_user_profile_updated

**Coming soon:** Restrict Content Pro is becoming Kadence Memberships. You may see both names used while we update the product, documentation, and customer experience.

> **Note**: This is part of the developer docs and is considered custom code. Unfortunately, we cannot provide support for custom code at this time as we do not have the additional resources that would be necessary to provide support for custom code.
> 
> If you need assistance with this, please reach out to our list of consultants for further assistance:  
> [https://codeable.io/developers/restrict-content-pro/](https://codeable.io/developers/restrict-content-pro/)

Triggers when a user updates their profile through the[ `[rcp_profile_editor]` shortcode](https://docs.nexcess.com/software/kadence/restrict-content-pro/rcp_profile_editor/).

**Parameters**

- `$user_id` (int) — ID of the user editing their profile.
- `$userdata` (array) — Submitted `WP_User` fields: `ID`, `first_name`, `last_name`, `display_name`, `user_email`.
- `$old_data` (`WP_User`) — User object from before the update.

**Example**:

Saving custom profile fields on this hook (same pattern as [Creating Custom Registration Fields](https://docs.nexcess.com/software/kadence/restrict-content-pro/creating-custom-registration-fields/)):

```
/**
 * Store custom fields when a member updates their profile.
 *
 * @param int     $user_id  User ID.
 * @param array   $userdata Submitted user fields.
 * @param WP_User $old_data User object before the update.
 */
function pw_rcp_save_user_fields_on_profile_save( $user_id, $userdata = array(), $old_data = null ) {
	if ( ! empty( $_POST['rcp_profession'] ) ) {
		update_user_meta( $user_id, 'rcp_profession', sanitize_text_field( wp_unslash( $_POST['rcp_profession'] ) ) );
	}

	if ( ! empty( $_POST['rcp_location'] ) ) {
		update_user_meta( $user_id, 'rcp_location', sanitize_text_field( wp_unslash( $_POST['rcp_location'] ) ) );
	}
}
add_action( 'rcp_user_profile_updated', 'pw_rcp_save_user_fields_on_profile_save', 10, 3 );
```
