The gform_user_registration_check_email_pre_signup_activation filter allows you to disable the check for an email already being used by a registered user. This enables the use of custom code or third-party plugins to bypass this WordPress core limitation in the registration process.
Usage
add_filter('gform_user_registration_check_email_pre_signup_activation', '__return_false');
When using this filter to allow users to use already registered emails for new registrations, you also need to use the gform_user_registration_validation filter.
Parameters
- $check_email (bool): True or false.
More information
See Gravity Forms Docs: gform_user_registration_check_email_pre_signup_activation
Place this code in the functions.php
file of your active theme. This filter was added in Gravity Forms User Registration Add-On 2.4.2. The filter is located in GFUserSignups::activate_signup() in signups.php
.
Examples
Disable email check during registration
Disable the check for an email already being used by a registered user during the registration process.
add_filter('gform_user_registration_check_email_pre_signup_activation', '__return_false');
Custom email check function
Create a custom function to check for email and bypass the default email check.
function custom_email_check($check_email) { // Your custom code here return $check_email; } add_filter('gform_user_registration_check_email_pre_signup_activation', 'custom_email_check');
Allow specific email domain to bypass email check
Allow users with a specific email domain to bypass the email check.
function allow_specific_domain($check_email, $user_email) { if (strpos($user_email, '@example.com') !== false) { return false; } return $check_email; } add_filter('gform_user_registration_check_email_pre_signup_activation', 'allow_specific_domain', 10, 2);
Disable email check for specific form
Disable email check for a specific Gravity Forms form.
function disable_email_check_for_specific_form($check_email, $form_id) { if ($form_id == 5) { return false; } return $check_email; } add_filter('gform_user_registration_check_email_pre_signup_activation', 'disable_email_check_for_specific_form', 10, 2);
Disable email check for users with specific roles
Disable the email check for users with specific roles (e.g., “editor”).
function disable_email_check_for_specific_role($check_email, $user_role) { if ($user_role == 'editor') { return false; } return $check_email; } add_filter('gform_user_registration_check_email_pre_signup_activation', 'disable_email_check_for_specific_role', 10, 2);