Jump to content

I can't remove the Recaptcha


MikaB

Recommended Posts

2 hours ago, MikaB said:

Hello,

I'm making my own Crewcenter for some VAs but I can't remove the Recaptcha as it says that it is outdated.

When I remove it from the 'registration.php' in modules it gives me an error. Can someone help me?

Thanks

Not sure why you would want to remove it because you will receive spam accounts. but you need to set your google recapatcha keys in your local.config.php for v2 of recapatcha to work

Link to comment
Share on other sites

  • 2 months later...

As mentioned above, the recaptcha key needs to go into the local.config.php file, but ALSO the Registration Form File, it will not work without changing the script you get from google in your Google account that points to the recaptcha key, period.........examples below; 

The file registraion_mainform.php also "NEEDS" this to be changed, this file lives in the core/templates , folder of your server.......This must match of course the key you put into the local.config.php file.

Go towards the very bottom of the registration_mainform.php file, you will find the below example.........example of mine;

<div class="form-group" style="display: flex;justify-content:  center;">
                                            <?php if(isset($captcha_error)){echo '<p class="error">'.$captcha_error.'</p>';} ?>
                             <div class="g-recaptcha" data-sitekey="YOUR API KEY FOR RECAPTCHA GOES HERE"></div>
                             <script type="text/javascript" src="https://www.google.com/recaptcha/api.js?hl=<?php echo $lang;?>"></script>
                                        </div>
                                    </div>
                                    <div class="footer text-center">
                                        <input type="submit" class="btn btn-fill btn-danger btn-wd" name="submit" value="Register!" /> <!--change this to your skin for the buttons-->
                                    </div>
                                </div>
                            </form>

DO NOT change anything in the core/modules Registration.php file, you will really have issues if you do. The only 2 files you need to change are the above mentioned, if your Recaptcha keys are correct according to  your Google Account.

Hope this helps, Jim........

Link to comment
Share on other sites

if I understood correctly, will the code be replaced with yours?

registration_mainform.php:

	<dt>reCaptcha</dt>
	<dd>
            <?php if(isset($captcha_error)){echo '<p class="error">'.$captcha_error.'</p>';} ?>
            <div class="g-recaptcha" data-sitekey="<?php echo $sitekey;?>"></div>
            <script type="text/javascript" src="https://www.google.com/recaptcha/api.js?hl=<?php echo $lang;?>">
            </script>
	</dd>

	<dt></dt>
	<dd><p>By clicking register, you're agreeing to the terms and conditions</p></dd>
	<dt></dt>
	<dd><input type="submit" name="submit" value="Register!" /></dd>
</dl>
</form>

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...