mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
Fix blocked words
This commit is contained in:
@@ -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 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user