illegal_user_logins

illegal_user_logins

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.5.2

apply_filters('illegal_user_logins') is found 5 times:

  • /wp-admin/includes/user.php line 199
    		$errors->add( 'user_login', __( '<strong>Error:</strong> This username is already registered. Please choose another one.' ) );
    	}
    
    	/** This filter is documented in wp-includes/user.php */
    	$illegal_logins = (array) apply_filters( 'illegal_user_logins', array() );
    
    	if ( in_array( strtolower( $user->user_login ), array_map( 'strtolower', $illegal_logins ), true ) ) {
    		$errors->add( 'invalid_username', __( '<strong>Error:</strong> Sorry, that username is not allowed.' ) );
    	}
    
    	// Checking email address.
    
  • /wp-includes/ms-functions.php line 486
    		$errors->add( 'user_name', __( 'Sorry, that username is not allowed.' ) );
    	}
    
    	/** This filter is documented in wp-includes/user.php */
    	$illegal_logins = (array) apply_filters( 'illegal_user_logins', array() );
    
    	if ( in_array( strtolower( $user_name ), array_map( 'strtolower', $illegal_logins ), true ) ) {
    		$errors->add( 'user_name', __( 'Sorry, that username is not allowed.' ) );
    	}
    
    	if ( ! is_email( $user_email ) ) {
    
  • /wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php line 1278
    			);
    		}
    
    		/** This filter is documented in wp-includes/user.php */
    		$illegal_logins = (array) apply_filters( 'illegal_user_logins', array() );
    
    		if ( in_array( strtolower( $username ), array_map( 'strtolower', $illegal_logins ), true ) ) {
    			return new WP_Error(
    				'rest_user_invalid_username',
    				__( 'Sorry, that username is not allowed.' ),
    				array( 'status' => 400 )
    
  • /wp-includes/user.php line 2144
    	 * @since 4.4.0
    	 *
    	 * @param array $usernames Array of disallowed usernames.
    	 */
    	$illegal_logins = (array) apply_filters( 'illegal_user_logins', array() );
    
    	if ( in_array( strtolower( $user_login ), array_map( 'strtolower', $illegal_logins ), true ) ) {
    		return new WP_Error( 'invalid_username', __( 'Sorry, that username is not allowed.' ) );
    	}
    
    	/*
    
  • /wp-includes/user.php line 3359
    	} elseif ( username_exists( $sanitized_user_login ) ) {
    		$errors->add( 'username_exists', __( '<strong>Error:</strong> This username is already registered. Please choose another one.' ) );
    	} else {
    		/** This filter is documented in wp-includes/user.php */
    		$illegal_user_logins = (array) apply_filters( 'illegal_user_logins', array() );
    		if ( in_array( strtolower( $sanitized_user_login ), array_map( 'strtolower', $illegal_user_logins ), true ) ) {
    			$errors->add( 'invalid_username', __( '<strong>Error:</strong> Sorry, that username is not allowed.' ) );
    		}
    	}
    
    	// Check the email address.