[wp-trac] [WordPress Trac] #19261: wp_update_user causes password to be double hashed
WordPress Trac
wp-trac at lists.automattic.com
Wed Nov 16 14:00:38 UTC 2011
#19261: wp_update_user causes password to be double hashed
-------------------------------------+------------------------------
Reporter: WPsites | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone: Awaiting Review
Component: Users | Version: 3.3
Severity: normal | Resolution: fixed
Keywords: reporter-feedback close |
-------------------------------------+------------------------------
Changes (by WPsites):
* status: new => closed
* resolution: => fixed
Comment:
wp_update_user is meant to as it says in the codex: Update (or create) a
user in the database.
So I've used it to create the user passing in a plain text password as
generated by wp_generate_password(). If the function isn't capable of
creating a user then the codex shouldn't say that is what it does.
I think that's the problem here. The codex says wp_update_user will create
a user when in fact it doesn't (well it does but it double hashes the
password).
So as the function names suggest wp_update_user updates a user and
wp_insert_user inserts the user. I've gone ahead and updated the codex for
wp_update_user to remove the initial indication that wp_update_user
creates a user and put a note to let people know wp_insert_user is the
best function to use when creating a new user.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19261#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list