• Resolved moikano

    (@moikano)


    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support andrewshu

    (@andrewshu)

    Hello @moikano

    Thank you for your feedback. We will check this.

    Regards.

    Plugin Support andrewshu

    (@andrewshu)

    Hi @moikano

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread if any other questions come up and we’d be happy to help. ??

    Regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Error when is set unique_email validation for a field with key user_email’ is closed to new replies.