Fix role validation on registration process

This commit is contained in:
champsupertramp
2016-09-11 12:40:52 +08:00
parent 75c6f23172
commit 270e6c8e66
+1 -1
View File
@@ -124,7 +124,7 @@ class UM_Form {
$role = current( $_POST['role'] );
}
if ( isset( $custom_field_roles ) && ! in_array( $role , $custom_field_roles ) ) {
if ( isset( $custom_field_roles ) && is_array( $custom_field_roles ) && ! in_array( $role , $custom_field_roles ) ) {
wp_die( __( 'This is not possible for security reasons.','ultimatemember') );
}