[wp-trac] [WordPress Trac] #13317: Code Impriovement in get_userdata

WordPress Trac wp-trac at lists.automattic.com
Wed May 12 22:57:17 UTC 2010


#13317: Code Impriovement in get_userdata
--------------------------+-------------------------------------------------
 Reporter:  hakre         |        Owner:        
     Type:  defect (bug)  |       Status:  closed
 Priority:  lowest        |    Milestone:  3.0   
Component:  General       |      Version:        
 Severity:  normal        |   Resolution:  fixed 
 Keywords:  has-patch     |  
--------------------------+-------------------------------------------------

Comment(by hakre):

 A non-numeric user id? I have not seen that but for requesting the admin
 user obect:

 {{{ $admin_user = get_userdata( array( 'theee_admin();' ) ); }}}

 This one at least works for 99% of all installs and I think we must keep
 it backwards compatible. I've seen that with some plugins.

 I was making up my mind a bit what the difference between just using
 {{{(int) abs( $val )}}} instead of {{{absint( abs( intval( $val ) ) )}}}
 would be. I have not found any difference by now, so it might be of some
 value to remove absint() from code and replace it with that more effective
 variant.

 Please let me know if you want a patch.

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


More information about the wp-trac mailing list