Fix blocked words

This commit is contained in:
jonfalcon
2016-02-11 11:32:03 -08:00
parent 11f833dbb4
commit 40f4d65ed5
+1 -3
View File
@@ -92,9 +92,8 @@
if ( $words != '' ) {
$words = array_map("rtrim", explode("\n", $words));
if( isset( $fields ) && ! empty( $key ) ){
if( isset( $fields ) ){
foreach( $fields as $key => $array ) {
if ( isset( $args[$key] ) && !empty( $args[$key] ) ) {
if ( isset($array['validate']) && in_array( $array['validate'], array('unique_username','unique_email','unique_username_or_email') ) ) {
if ( !$ultimatemember->form->has_error( $key ) && in_array( $args[$key], $words ) ) {
$ultimatemember->form->add_error( $key, __('You are not allowed to use this word as your username.','ultimatemember') );
@@ -102,7 +101,6 @@
}
}
}
}
}