[wp-trac] [WordPress Trac] #19615: Deprecate get_currentuserinfo()

WordPress Trac noreply at wordpress.org
Fri Jan 15 10:15:24 UTC 2016


#19615: Deprecate get_currentuserinfo()
------------------------------+-------------------------
 Reporter:  scribu            |       Owner:  swissspidy
     Type:  enhancement       |      Status:  closed
 Priority:  normal            |   Milestone:  4.5
Component:  Users             |     Version:
 Severity:  normal            |  Resolution:  fixed
 Keywords:  has-patch commit  |     Focuses:  docs
------------------------------+-------------------------
Changes (by swissspidy):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"36311"]:
 {{{
 #!CommitTicketReference repository="" revision="36311"
 Users: Deprecate the `get_currentuserinfo()` pluggable function.

 It encourages an ugly pattern like `global $userdata;
 get_currentuserinfo();` in plugins/themes. `wp_get_current_user()` should
 be used instead, e.g. `$current_user = wp_get_current_user();`.

 Props scribu for initial patch.
 Fixes #19615.
 }}}

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


More information about the wp-trac mailing list