[wp-trac] [WordPress Trac] #48097: Fix `user_registered` in WP_Insert_User function

WordPress Trac noreply at wordpress.org
Sat Sep 21 11:57:36 UTC 2019


#48097: Fix `user_registered` in WP_Insert_User function
---------------------------+-----------------------------
 Reporter:  mehrshaddarzi  |      Owner:  (none)
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Users          |    Version:
 Severity:  normal         |   Keywords:  has-patch
  Focuses:                 |
---------------------------+-----------------------------
 The WordPress local date [get_option( 'gmt_offset' ) * HOUR_IN_SECONDS] is
 not specified in the WordPress `wp_insert_user` function in
 `user_registered` parameter.

 The wp-includes/user.php in Line 1724 is :


 {{{
 $user_registered = empty( $userdata['user_registered'] ) ? gmdate( 'Y-m-d
 H:i:s' ) : $userdata['user_registered'];
 }}}


 change to :

 {{{
 $user_registered = empty( $userdata['user_registered'] ) ? current_time(
 'mysql' ) : $userdata['user_registered'];
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48097>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list