diff --git a/core/um-form.php b/core/um-form.php index da1ffbd0..51227634 100644 --- a/core/um-form.php +++ b/core/um-form.php @@ -121,7 +121,7 @@ class UM_Form { $role = current( $_POST['role'] ); } - if ( isset( $custom_field_roles ) && is_array( $custom_field_roles ) && ! in_array( $role , $custom_field_roles ) ) { + if ( isset( $custom_field_roles ) && is_array( $custom_field_roles ) && ! empty( $role ) && ! in_array( $role , $custom_field_roles ) ) { wp_die( __( 'This is not possible for security reasons.','ultimatemember') ); }