[wp-trac] [WordPress Trac] #13088: update_usermeta() and update_user_meta() behave differently

WordPress Trac wp-trac at lists.automattic.com
Thu Apr 22 21:51:18 UTC 2010


#13088: update_usermeta() and update_user_meta() behave differently
--------------------------+-------------------------------------------------
 Reporter:  mdawaffe      |       Owner:            
     Type:  defect (bug)  |      Status:  new       
 Priority:  normal        |   Milestone:  Unassigned
Component:  Users         |     Version:  3.0       
 Severity:  major         |    Keywords:  meta      
--------------------------+-------------------------------------------------
 == Problem ==

 The old function, update_usermeta(), deletes the meta row if the passed
 value is empty.

 The new function, update_user_meta(), goes through the meta API function
 update_metadata(), which does not delete the meta row if the passed value
 is empty.

 update_usermeta() is marked as deprecated, but, because of this
 difference, is not an alias of update_user_meta().  Instead, the function
 is fully defined in deprecated.php.

 == Impact ==

 update_user_option() used to go through update_usermeta() and now goes
 through update_user_meta(), so it's behavior has changed.


 == Example ==


 Multisite signups are wonky: source:/trunk/wp-includes/ms-
 functions.php at 14190#L789

 == Ideas ==

 Switch update_user_option() back to update_usermeta().

 Add delete_user_meta() logic to update_user_option().

 Use delete_user_meta() where needed instead.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13088>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list