[wp-trac] [WordPress Trac] #11395: make is_user_logged_in() return the $user's ID instead of true

WordPress Trac wp-trac at lists.automattic.com
Sat Dec 12 22:32:09 UTC 2009


#11395: make is_user_logged_in() return the $user's ID instead of true
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:                        
     Type:  enhancement        |      Status:  new                   
 Priority:  normal             |   Milestone:  3.0                   
Component:  Users              |     Version:  2.9                   
 Severity:  normal             |    Keywords:  has-patch dev-feedback
-------------------------------+--------------------------------------------

Comment(by Denis-de-Bernardy):

 Replying to [comment:3 filosofo]:
 > If we really need {{{get_current_user_id()}}} or the like let's create
 it.  Let's not add any hidden, unexpected functionality to existing
 functions.

 Personally, I see it as a bonus. It's like... if I check if a user is
 logged in for some functionality, the odds are 80% that I'll then wonder
 which one might be logged in, in order to check a user meta. So might as
 well return the user's id.

 I do see your point that it ought to be named get_current_user_id(),
 though.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11395#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list