mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
Merge pull request #1519 from ultimatemember/fix/unique_email_check
Fix unique_email validation
This commit is contained in:
@@ -924,7 +924,7 @@ function um_submit_form_errors_hook_( $submitted_data, $form_data ) {
|
||||
UM()->form()->add_error( $key, __( 'You must provide your email', 'ultimate-member' ) );
|
||||
} elseif ( 'register' === $mode && $email_exists ) {
|
||||
UM()->form()->add_error( $key, __( 'The email you entered is incorrect', 'ultimate-member' ) );
|
||||
} elseif ( 'profile' === $mode && $email_exists && $email_exists !== $submitted_data['user_id'] ) {
|
||||
} elseif ( 'profile' === $mode && $email_exists && absint( $email_exists ) !== absint( $submitted_data['user_id'] ) ) {
|
||||
UM()->form()->add_error( $key, __( 'The email you entered is incorrect', 'ultimate-member' ) );
|
||||
} elseif ( ! is_email( $submitted_data[ $key ] ) ) {
|
||||
UM()->form()->add_error( $key, __( 'The email you entered is incorrect', 'ultimate-member' ) );
|
||||
|
||||
Reference in New Issue
Block a user