validate_username

Definition:
function validate_username( $username ) {}

Checks whether an username is valid.

Parameters

  • string $username: Username.

Return values

returns:Whether username given is valid

Defined filters

  • validate_username
    apply_filters( 'validate_username', $valid, $username )

Source code

function validate_username( $username ) {

	$sanitized = sanitize_user( $username, true );

	$valid = ( $sanitized == $username );

	return apply_filters( 'validate_username', $valid, $username );

}

10532

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: