[wp-trac] [WordPress Trac] #17009: wp_update_user not creating a new user if not passed an ID
WordPress Trac
wp-trac at lists.automattic.com
Sat Apr 2 12:21:58 UTC 2011
#17009: wp_update_user not creating a new user if not passed an ID
--------------------------+------------------------------
Reporter: casben79 | Owner: casben79
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Users | Version: 3.1
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+------------------------------
Comment (by hakre):
> the function wp_update_user() is not creating a new user if not passed
an ID.
I think the description of the function is not showing the full picture:
{{{
* If $userdata does not contain an 'ID' key, then a new user will be
created
* and the new user's ID will be returned.
}}}
The said check is not performed nor is a user created. The functionality
has probably moved into `edit_user()` so the phpdoc should be corrected
instead.
I think this is an error that went in in [6564] from patch
[attachment:ticket:4383:registration.phpdoc.r6542.diff
registration.phpdoc.r6542.diff].
I think so because if ID is empty, get_userdata(empty) will return false
and not an object that is treated like so later on.
Related: [16009], #13761(, [8782], #7550, [6564], #4383), [2872]
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17009#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list