Error when is set unique_email validation for a field with key user_email
-
Hi,
if in a profile form there is a field with key “user_email” and is set validation to “unique_email”, when a logged user updates profile form the error “email incorrect” is showed;
I solved editing line 927 in “\ultimate-member\includes\core\um-actions-form.php” (of latest version 2.8.4) from
} elseif ( 'profile' === $mode && $email_exists && $email_exists !== $submitted_data['user_id'] ) {
to
} elseif ( 'profile' === $mode && $email_exists && $email_exists != $submitted_data['user_id'] ) {
that is, I changed “strict” comparison
$email_exists !== $submitted_data['user_id']
to “simple” comparison$email_exists != $submitted_data['user_id']
.ps: other possibility I think is to force
$submitted_data['user_id'] = um_get_requested_user();
to be an integer (on line 918 in the same file).Hope this helps someone.
- The topic ‘Error when is set unique_email validation for a field with key user_email’ is closed to new replies.