Fix security check in registration form

This commit is contained in:
champsupertramp
2016-03-05 21:28:43 +08:00
parent 963f3648ea
commit 1baa407995
+4 -2
View File
@@ -253,9 +253,11 @@
if ( isset( $args['custom_fields']['role_select'] ) || isset( $args['custom_fields']['role_radio'] ) ) return;
if (isset($args['role']) && !empty($args['role'])) {
$use_global_settings = get_post_meta( $args['form_id'], '_um_register_use_globals', true);
if (isset($args['role']) && !empty($args['role']) && $use_global_settings == 0 ) {
$role = $args['role'];
} else {
} else if( $use_global_settings == 1 ) {
$role = um_get_option('default_role');
}