Make WordPress Core

Opened 15 years ago

Closed 13 years ago

#10327 closed enhancement (duplicate)

update_user_meta Filter

Reported by: 5ubliminal's profile 5ubliminal Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.8
Component: Plugins Keywords:
Focuses: Cc:


A filter on the update_usermeta would be great. It's a rather sensitive area but we could use it. It should go right under:

$meta_key = preg_replace('|[^a-z0-9_]|i', '', $meta_key);

like this:

$meta_value = apply_filters('update_user_meta', $meta_value, $meta_key, $user_id);

I use this to intercept changes on capabilities which are not filtered anywhere... afaik.

Change History (4)

#1 @Denis-de-Bernardy
15 years ago

  • Keywords reporter-feedback added
  • Milestone changed from Unassigned to Future Release

#2 @5ubliminal
15 years ago

Sorry for the long delay. Been on a no-internet vacation :)

I need a hook to capture changes in user roles. When you use Change Role inside the user management screen ... it will remove Custom Roles I might have set for a user.

I need a way to hook into this action and make sure my special internal roles [hidden from the Change Role list] are kept between WP role changes.

I hope I make some sense. I need my special roles to help me inside the Users screen to list only those belonging to an internal role.

#3 @scribu
15 years ago

  • Keywords reporter-feedback removed

See #10837.

#4 @scribu
13 years ago

  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from new to closed

There are plenty of hooks in wp-includes/meta.php now. Closing as dup of #10837.

Note: See TracTickets for help on using tickets.