[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
Fri Dec 11 15:49:22 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 filosofo):

 Don't you think it seems reasonable to expect a function prefixed with
 "is_" to have a boolean return value?  That's what the built-in PHP
 functions do, and all of the other WP functions (as far as I know).

 And it especially makes sense in light of that other ticket you opened
 that shows PHP is inconsistent across versions in comparing variables of
 differing types.

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


More information about the wp-trac mailing list