[wp-trac] [WordPress Trac] #13785: Un-deprecate get_current_user_id
WordPress Trac
wp-trac at lists.automattic.com
Tue Jun 8 14:46:10 UTC 2010
#13785: Un-deprecate get_current_user_id
--------------------------+-------------------------------------------------
Reporter: filosofo | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.0
Component: Users | Version: 3.0
Severity: normal | Keywords: has-patch
--------------------------+-------------------------------------------------
There is not a direct, reliable way to access the current user's ID. You
either have to get the user object and then the ID property if present, or
assume that the $current_user global is populated already (and that's not
a reliable assumption).
`get_current_user_id` is the perfect solution and existed (imperfectly) in
MU. Rather than deprecating it, we should move it to general WP and make
it use the WP pluggable user functions.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13785>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list