[wp-trac] [WordPress Trac] #43957: check_password_reset_key could use get_user_by instead of direct query
WordPress Trac
noreply at wordpress.org
Fri May 4 12:14:13 UTC 2018
#43957: check_password_reset_key could use get_user_by instead of direct query
------------------------------------+------------------------------
Reporter: thomaslhotta | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Login and Registration | Version: 4.9.5
Severity: normal | Resolution:
Keywords: | Focuses:
------------------------------------+------------------------------
Comment (by subrataemfluence):
To my understanding, direct database queries are mainly used when we
intend to pull values from one or more columns in a table which are
`indexed` in order to gain more speed. In `wp_users` table the indexed
columns are:
`ID`, `user_login`, `user_nicename` and `user_email`.
Since `check_password_reset_key` function deals with `user_login` column,
probably that's the reason a direct database query is used.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43957#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list