mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-18 04:25:07 +00:00
Better logic for preg_match() calls in ms-functions.php. fixes #24222.
git-svn-id: http://core.svn.wordpress.org/trunk@24130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3139a0451e
commit
c39b14a486
@ -460,9 +460,7 @@ function wpmu_validate_user_signup($user_name, $user_email) {
|
|||||||
$errors->add( 'user_name', __( 'Sorry, usernames may not contain the character “_”!' ) );
|
$errors->add( 'user_name', __( 'Sorry, usernames may not contain the character “_”!' ) );
|
||||||
|
|
||||||
// all numeric?
|
// all numeric?
|
||||||
$match = array();
|
if ( preg_match( '/^[0-9]*$/', $user_name ) )
|
||||||
preg_match( '/[0-9]*/', $user_name, $match );
|
|
||||||
if ( $match[0] == $user_name )
|
|
||||||
$errors->add('user_name', __('Sorry, usernames must have letters too!'));
|
$errors->add('user_name', __('Sorry, usernames must have letters too!'));
|
||||||
|
|
||||||
if ( !is_email( $user_email ) )
|
if ( !is_email( $user_email ) )
|
||||||
@ -572,9 +570,7 @@ function wpmu_validate_blog_signup($blogname, $blog_title, $user = '') {
|
|||||||
$errors->add( 'blogname', __( 'Sorry, you may not use that site name.' ) );
|
$errors->add( 'blogname', __( 'Sorry, you may not use that site name.' ) );
|
||||||
|
|
||||||
// all numeric?
|
// all numeric?
|
||||||
$match = array();
|
if ( preg_match( '/^[0-9]*$/', $blogname ) )
|
||||||
preg_match( '/[0-9]*/', $blogname, $match );
|
|
||||||
if ( $match[0] == $blogname )
|
|
||||||
$errors->add('blogname', __('Sorry, site names must have letters too!'));
|
$errors->add('blogname', __('Sorry, site names must have letters too!'));
|
||||||
|
|
||||||
$blogname = apply_filters( 'newblogname', $blogname );
|
$blogname = apply_filters( 'newblogname', $blogname );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user