Appearance
Update User Profile
The Update User Profile node updates the current WordPress user's core profile fields and custom meta data. It only allows users to update their own profile -- not other users'.
Configuration
This node has no configuration options. It reads the fields to update from the input data.
Input
Accepts a single object (associative array). The keys determine which fields are updated.
Core Fields
These fields are updated via wp_update_user():
| Key | Description |
|---|---|
display_name | The user's display name. |
user_email | The user's email address. |
first_name | First name. |
last_name | Last name. |
description | Biographical info. |
user_url | Website URL. |
Meta Fields
Any other key (that does not start with _ and is not ID or id) is saved as user meta via update_user_meta().
Output
Returns the input data with _updated: true and _user_id added on success.
json
{
"display_name": "Jane Doe",
"phone": "+1-555-0123",
"_updated": true,
"_user_id": 5
}On error (not logged in):
json
{
"_valid": false,
"_errors": [{ "field": "_auth", "message": "You must be logged in." }]
}Security
- All values are sanitized with
sanitize_key()for keys andsanitize_text_field()for values. - The node uses
get_current_user_id()and only updates that user's data. - Keys starting with
_,ID, andidare ignored to prevent privilege escalation.
Example Use Cases
Profile update form
Context --> Validate --> Sanitize --> Update User Profile --> OutputForm fields: display_name, user_email, phone (meta), company (meta).
Update user preferences
Context --> Set Field (theme = 'dark') --> Update User Profile --> OutputOnboarding flow
Context --> Validate --> Update User Profile --> Set Field (onboarding_complete = '1') --> Update User Profile --> OutputWARNING
This node only updates the current user's profile. There is no way to update another user's data through this node, which is a deliberate security constraint.