Captcha

Permalink
I need to have captcha on the concrete5 login page.

I can get the built captcha to display on the login page no problem... but I'm unsure of how to get it to validate the captcha.

Is it possible to add the built in captcha to the login page and get it to validate... if so.. how...?

...or...would it be easier to add captcha to the login block in the marketplace..?

JimboJetset
View Replies:
kino replied on at Permalink Reply
kino
display captcha code

/concrete/blocks/form/controller.php
line 593
if($surveyBlockInfo['displayCaptcha']) {
              echo '<tr><td colspan="2">';
               echo(t('Please type the letters and numbers shown in the image.'));   
               echo '</td></tr><tr><td>&nbsp;</td><td>';
               $captcha = Loader::helper('validation/captcha');            
               $captcha->display();
               print '<br/>';
               $captcha->showInput();      
               //echo isset($errors['captcha'])?'<span class="error">' . $errors['captcha'] . '</span>':'';
              echo '</td></tr>';
            }



check captcha code
/concrete/blocks/form/controller.php
line 204

// check captcha if activated
      if ($this->displayCaptcha) {
         $captcha = Loader::helper('validation/captcha');
         if (!$captcha->check()) {
            $errors['captcha'] = t("Incorrect captcha code");
            $_REQUEST['ccmCaptchaCode']='';
         }
      }
kino replied on at Permalink Reply 1 Attachment
kino
complete.

expand attached file
put
/controller/login.php
/single_page/login.php
JimboJetset replied on at Permalink Reply
JimboJetset
Cheers Kino