Writing user meta is risky without safety rails
You want to tag 200 customers with loyalty_tier=gold. WordPress's profile page edits one user at a time. The bulk alternative, update_user_meta in PHP, works, but one typo into wp_capabilities can elevate a subscriber to admin. Or clear session tokens for everyone.
Production WordPress installs have been compromised by exactly this pattern: a command meant to write loyalty_tier accidentally wrote wp_capabilities because of a variable name mixup.
What most people do instead
A better way: one command, protected keys blocked
Run update user meta with -user_id, -meta_key, -meta_value. Privilege-escalation keys (wp_capabilities, wp_user_level, session_tokens, use_ssl) are hard-blocked. A typo'd write fails with an error instead of silently escalating privileges.
Shown in advanced mode, where commands start with tp. In easy mode you type the same command without the tp prefix.
Privilege-escalation keys hard-blocked. Attempting to write wp_capabilities, wp_user_level, session_tokens, or similar core keys returns an error, doesn't touch the database. Even inside a macro running under a trigger, there's no path to elevate.
How it works
Wraps update_user_meta with a blocklist check. If -user_id is omitted, uses the current user (useful for "on_user_register" triggered macros). Returns success/failure so branching macros can react.
| Parameter | Value |
|---|---|
-user_id | User to update. Navigator may leave this empty for the current user; Macro, Schedule and Startup require an explicit or dynamic positive ID. |
-meta_key (required) | Public scalar key to create or update (e.g. preferred_theme, billing_phone). Leading-underscore, managed and secret-like keys are rejected. |
-meta_value (required) | Scalar text or number to store (maximum 4096 bytes). JSON may be stored as text; arrays and objects are rejected. |
| Blocked keys | wp_capabilities, wp_user_level, session_tokens, use_ssl, and similar core keys |
| Can be used in |
Real example
You're launching a VIP program for customers who've spent over $1,000 lifetime. Each qualifying user gets a loyalty_tier=gold meta flag that your theme reads to show a VIP badge on their account.
Macro: tp filter user -role=customer -spend_min=1000 → for_each: tp update user meta -meta_key=loyalty_tier -meta_value=gold. 87 VIPs enrolled in under a minute. Theme renders badges on the next page load. Monthly schedule recomputes tiers as customers spend more.
Goes further with TrueCommander
Frequently asked questions
update_user_meta() snippet, run tp update user meta -user_id=123 -meta_key=preferred_theme -meta_value=dark. It creates the field if missing, or updates it if it exists.