#23192 closed enhancement (fixed)
Use get_user_by() in is_user_spammy()
| Reported by: | ocean90 | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.6 |
| Component: | Multisite | Version: | |
| Severity: | normal | Keywords: | has-patch commit needs-unit-tests |
| Cc: | Focuses: |
Description (last modified by )
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.
Attachments (3)
Change History (11)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I agree. We could then deprecate
get_user_id_from_string(), since it's the only instance in core.