CakeDC\Users\View\Helper\UserHelper::addReCaptcha PHP Method

addReCaptcha() public method

Add reCaptcha to the form
public addReCaptcha ( ) : mixed
return mixed
    public function addReCaptcha()
    {
        if (!Configure::read('Users.reCaptcha.key')) {
            return $this->Html->tag('p', __d('CakeDC/Users', 'reCaptcha is not configured! Please configure Users.reCaptcha.key'));
        }
        $this->addReCaptchaScript();
        $this->Form->unlockField('g-recaptcha-response');
        return $this->Html->tag('div', '', ['class' => 'g-recaptcha', 'data-sitekey' => Configure::read('Users.reCaptcha.key')]);
    }