[wp-trac] [WordPress Trac] #39370: wp_insert_user() appends suffix to nicename when updating already existing user
WordPress Trac
noreply at wordpress.org
Thu Mar 12 02:52:00 UTC 2020
#39370: wp_insert_user() appends suffix to nicename when updating already existing
user
-------------------------------+-----------------------------
Reporter: alfhen | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Users | Version: 4.6.1
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+-----------------------------
Comment (by azaozz):
As far as I see this can happen when the `$user_login` has been changed.
This cannot happen in code by default ($user_login is not changeable), but
can be added/enabled by a plugin.
Then the DB query will "find" a user ID as the updated `$user_login`
hasn't been saved yet. So using the `$user_login` to confirm if it is the
same user doesn't work. Would be better to use the user ID for that.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39370#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list