Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#16421 closed defect (bug) (duplicate)

Display Name and others within get / update user meta functions

Reported by: sc0ttkclark Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: Users Keywords:
Focuses: Cc:


Something I'd like to see implemented in a future version is the ability to use this type of code to update single values for a user

$display_name = get_user_meta($userid,'display_name',true);
$email = get_user_meta($userid,'user_email',true);
$newemail = 'my@email.com';

I'd like to see this be possible for the following fields:

user_login user_pass user_nicename user_email user_url user_registered display_name

Patch to come this week..

Change History (3)

#1 @sc0ttkclark
7 years ago

  • Cc sc0ttkclark@… added

#2 @scribu
7 years ago

The *_user_meta() functions should remain simple wrappers for their *_metadata() counterparts.

Accessing fields regardless if they're in wp_users of wp_usermeta should be done with a new set of functions. This was already suggested by filosofo, but I can't seem to find the ticket now.

#3 @scribu
7 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Found it: #14302

Going to close this as duplicate, since it seems like a special case of the more general proposal there.

Note: See TracTickets for help on using tickets.