Opened 12 years ago
Closed 12 years ago
#31513 closed defect (bug) (fixed)
Wrong description in DocBlock of function wp_insert_user()
| Reported by: | floriansimeth | Owned by: | DrewAPicture |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.2 |
| Component: | Users | Version: | 4.1 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | docs |
Description
Hey WP-Community,
I hope you all doing good.
I've found out that the variable name in the DocBlock of the wp_insert_user() in file /wp-includes/user.php (line 1689) is wrong.
The parameter $date_registered should be renamed to $user_registered. I don't know really why this parameter is called $user_registered as the value gets saved into the database table cell named date_registered.
I've tested that
wp_insert_user( array( 'date_registered' => '2010-12-05 10:00:01', 'user_pass' => 'test', 'user_login' => 'testperson', ) );
will not work whereas
wp_insert_user( array( 'user_registered' => '2010-12-05 10:00:01', 'user_pass' => 'test', 'user_login' => 'testperson', ) );
will do the trick (writes the date into the database correctly). So user_registered is right (as the documentation suggests).
I know that this is just a small thing. However it's confusing if one constantly takes a look into the core code instead of the documentation.
Thanks
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi floriansimeth,
Nice catch! The patch looks good, and we should be able to get this in for 4.2 no problem. Thanks for the patch.
This was introduced in [29116].