[wp-trac] [WordPress Trac] #29505: Both update_user_option and update_user_meta returning false

WordPress Trac noreply at wordpress.org
Thu Sep 4 20:15:16 UTC 2014


#29505: Both update_user_option and update_user_meta returning false
--------------------------+------------------------------
 Reporter:  miqdadk       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Users         |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by shooper):

 I just tried this on the trunk (post 4.0 release), and it worked OK in the
 init action.  Will try and duplicate it on the plugin activation action
 next.

 {{{
 add_action('init', 'test_29505');
 function test_29505() {
         global $current_user;
         if (is_user_logged_in()) {
                 var_dump(update_user_option($current_user->ID, 'test',
 1)); // returned int
                 var_dump(update_user_meta($current_user->ID, 'test', 1));
 // returned int
         }
         die();
 }
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29505#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list