Make WordPress Core

Opened 3 years ago

Last modified 12 months ago

#44107 new defect (bug)

wp_insert_user should return WP_Error if user_url's length is too long

Reported by: tszming Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: needs-patch
Focuses: Cc:


Just like the user_nicename checking

Consider the test below

public function test_wp_insert_user_should_reject_user_url_over_100_characters() {
    $user_url = str_repeat( 'a', 101 );

    $u             = wp_insert_user(
            'user_login'    => 'test',
            'user_email'    =>  'test@example.com',
            'user_pass'     => 'password',
            'user_url' => $user_url,

    $this->assertWPError( $u );

This also apply to the function wp_update_user

Change History (1)

#1 @sabernhardt
12 months ago

  • Component changed from General to Build/Test Tools
  • Keywords needs-patch added
Note: See TracTickets for help on using tickets.