EDD AJAX Check Username

This plugin requires Easy Digital Downloads.

The plugin also requires that use AJAX be checked in the EDD settings page.

With this plugin active there are no settings, it just applies the proper AJAX checks to the checkout page if allow user registration is enabled.

Developer Filters

Require minimum username length by filtering edd_ajax_check_username_maxlength

Example:

function wp_is_cool_edd_acu_length( $length ) {
	return '6'; // Require usernames to be 6 characters long.
}
add_filter( 'edd_ajax_check_username_maxlength', 'wp_is_cool_edd_acu_length' );

Add additional illegal usernames to the signup process. edd_ajax_check_username_illegal_usernames

Example:

function wp_is_cool_edd_acu_illegal( $usernames ) {
	$usernames[] = 'me';
	$usernames[] = 'edd';
	$usernames[] = 'mydad';
	$usernames[] = 'sexyboss';

	return $usernames;
}
add_filter( 'edd_ajax_check_username_illegal_usernames', 'wp_is_cool_edd_acu_illegal' );

Leave a Reply

Your email address will not be published. Required fields are marked *