mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- fixed PHP Warning if password is empty
This commit is contained in:
@@ -620,7 +620,7 @@ function um_submit_form_errors_hook_( $args ) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset( $array['force_good_pass'] ) && $array['force_good_pass'] == 1 ) {
|
||||
if ( isset( $array['force_good_pass'] ) && $array['force_good_pass'] && ! empty( $args['user_password'] ) ) {
|
||||
if ( isset( $args['user_login'] ) && strpos( strtolower( $args['user_login'] ), strtolower( $args['user_password'] ) ) > -1 ) {
|
||||
UM()->form()->add_error( 'user_password', __( 'Your password cannot contain the part of your username', 'ultimate-member' ));
|
||||
}
|
||||
@@ -878,7 +878,7 @@ function um_submit_form_errors_hook_( $args ) {
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case 'alphabetic':
|
||||
|
||||
if ( $args[ $key ] != '' ) {
|
||||
@@ -886,7 +886,7 @@ function um_submit_form_errors_hook_( $args ) {
|
||||
if ( ! preg_match( '/^\p{L}+$/u', str_replace( ' ', '', $args[ $key ] ) ) ) {
|
||||
UM()->form()->add_error( $key, __( 'You must provide alphabetic letters', 'ultimate-member' ) );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user