Fix custom field role validation

This commit is contained in:
Champ Camba
2017-05-04 21:07:49 +08:00
parent ac8a3357b2
commit b40109d803
+1 -1
View File
@@ -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') );
}