Forums

Captcha
[resolved] Captcha to Custom Form (2 posts)

  1. viper8421
    Member
    Posted 1 month ago #

    I am trying to get my captcha to work with my login but it seems to log in without the captcha being filled.

    My code

    if (!is_user_logged_in()){
      echo wp_login_form();
      if( function_exists( 'cptch_display_captcha_custom' ) )
      {
      echo "<input type='hidden' name='cntctfrm_contact_action' value='true' />";
      echo cptch_display_captcha_custom();
      }
    }
    else
    {
      global $current_user;
      get_currentuserinfo();
      	echo '<h3>Welcome <a href="';
    	echo (bp_loggedin_user_domain());
    	echo '">';
    	echo bp_loggedin_user_fullname();
    	echo '</h3></a>';
    	echo '<div style="float:left;margin:0 2em 1em 0;"><a href="';
    	echo (bp_loggedin_user_domain());
    	echo '">';
    	echo get_avatar( $current_user->ID, 80 );
    	echo '</a></div>';
    	echo '<a href="';
    	echo (bp_loggedin_user_domain() . "profile" . "/" . "edit");
    	echo '">Update your Profile</a><br />';
    	echo '<a href="';
    	echo (bp_loggedin_user_domain()) . "activity" . "/";
    	echo '">Update your Status</a><br />';
    	echo '<a href="http://dubtopian-review.eu/wp-admin/profile.php';
    	echo '">Edit Account Settings</a><br />';
    	echo '<a href="';
    	echo (bp_loggedin_user_domain()) . "messages" . "/";
    	echo '">Check your Inbox</a><br />';
    	echo '<br class="clear"><a class="button" title="Logout" href="';
    	echo wp_logout_url( get_permalink() );
    	echo '">Logout</a> ';
    	echo '<a class="button" title="Dashboard" href="';
    	echo admin_url();
    	echo '">Dashboard</a>';
    }

    The instructions add that "It is necessary to add the lines in the function of check of the entered data (where it is checked what the user enters and if everything is correct the mail will be sent)"

    if( function_exists( 'cptch_check_custom_form' ) && cptch_check_custom_form() !== true ) echo "Please complete the CAPTCHA."

    But I can not for the life of me figure out where that is.
    BTW: I went to Captcha Settings and checked Login form.

    http://wordpress.org/extend/plugins/captcha/

  2. bestwebsoft
    Member
    Plugin Author

    Posted 2 days ago #

    Hello viper8421,

    1. You have a custom form of login, that's why Captcha Settings
    and checked Login form will nor work.
    2. It is not enough to just add the captcha code, you should also add the captcha code checking. We can't tell you exactly where you should add the captcha checking, because you are using the custom form.
    if( function_exists( 'cptch_check_custom_form' ) &&
    > cptch_check_custom_form() !== true ) echo "Please complete the CAPTCHA."
    It seems like you placed it on a wrong place.

    Kind regards,
    Support Team

Reply

You must log in to post.

About this Plugin

About this Topic