Ticket #54987: 52650.patch
File 52650.patch, 903 bytes (added by , 3 years ago) |
---|
-
src/wp-includes/user.php
1977 1977 */ 1978 1978 if ( ! empty( $userdata['user_nicename'] ) ) { 1979 1979 $user_nicename = sanitize_user( $userdata['user_nicename'], true ); 1980 if ( mb_strlen( $user_nicename ) > 50 ) {1981 return new WP_Error( 'user_nicename_too_long', __( 'Nicename may not be longer than 50 characters.' ) );1982 }1983 1980 } else { 1984 1981 $user_nicename = mb_substr( $user_login, 0, 50 ); 1985 1982 } … … 1986 1983 1987 1984 $user_nicename = sanitize_title( $user_nicename ); 1988 1985 1986 /* 1987 * Check user_nicename not more then 50 characters. 1988 */ 1989 if ( mb_strlen( $user_nicename ) > 50 ) { 1990 $user_nicename = mb_substr( $user_nicename, 0, 50 ); 1991 } 1992 1989 1993 /** 1990 1994 * Filters a user's nicename before the user is created or updated. 1991 1995 *