Verifying user email

Home Forums Quform WordPress Verifying user email

This topic is: not resolved
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #28053
    oivanr
    Participant

    I am working in a form that will allow to the user reset the password, useful to the “Forgot your password?” at the login form. I make a form with a field that ask the mail but I am not able to verify if the mail exists at the users table.
    Can you help me, please?
    Thanks,

    #28054
    oivanr
    Participant

    I am using this code in a plugin:
    add_filter(‘quform_post_validate_7’, function ($valor, $key, Quform_Form $form)
    {
    $args = array(
    ‘search’ => $form->getValueText(‘quform_7_3’),
    ‘search_columns’ => ‘user_email’
    );

    $user_query = new WP_User_Query( $args );

    if ( empty( $user_query->get_results() ) )
    {
    $valor = ‘Not found’;
    $form->setValueText(‘quform_7_4’)->$valor;
    }
    else
    {
    $usuario = $wp_user_query->get_results();
    $valor = $usuario->display_name;
    $form->setValueText(‘quform_7_4’)->$valor;
    }

    return $valor;
    }, 10, 2);

    #28082
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    • This reply was modified 5 years, 3 months ago by Ally.
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy