Opened 8 years ago
Closed 8 years ago
#33820 closed defect (bug) (duplicate)
Fail to create a user whose username is longer than 50
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.3 |
Component: | Users | Keywords: | |
Focuses: | Cc: |
Description
When you create a user, the length of username is 50 or more, it fails to create the user. And also the result message is as same as the correctly does.
It could easily reproduce the issue like this in admin:
Users > Add New Username: 000000000000000000000000000000000000000000000000001 E-mail: foo@example.com press [Add New User]
or with wp_insert_user():
$login = '000000000000000000000000000000000000000000000000001'; $wp_insert_data = array( 'user_login' => $login, 'user_email' => 'foo@example.com', 'user_pass' => NULL, ); $user_id = wp_insert_user($wp_insert_data); # ----> The value of $user_id is 0 # It should be WP_Error or userid(which is 1 or more), but not.
Some logic in Wordpress expects WP_Error in case of error, it also occurred Notice error in wp_new_user_notification(), due to $user->user_login is wrong.
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
Duplicate of #33793.