[wp-trac] [WordPress Trac] #23192: Use get_user_by() in is_user_spammy()

WordPress Trac noreply at wordpress.org
Sun Jan 13 22:28:02 UTC 2013


#23192: Use get_user_by() in is_user_spammy()
-------------------------+------------------
 Reporter:  ocean90      |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  3.6
Component:  Multisite    |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+------------------
Changes (by SergeyBiryukov):

 * keywords:  2nd-opinion has-patch => has-patch
 * milestone:  Awaiting Review => 3.6


Old description:

> Comes up after reading #23190.
>
> Since `is_user_spammy` expects a user name, we should replace it with
> get_user_by( 'login', $username ). Same for the id.

New description:

 Comes up after reading #23190.

 Since `is_user_spammy` expects a user name, we should replace
 `get_user_id_from_string( $username )` with `get_user_by( 'login',
 $username )`. Same for the id.

--

Comment:

 I agree. We could then deprecate `get_user_id_from_string()`, since it's
 the only instance in core.

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


More information about the wp-trac mailing list