Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

UserPage Module and Spam Protection


5 Posts   798 Views


26 March 2010 at 1:37pm Community Member, 107 Posts

I am using the UserPage Module and was wondering how to get the Spam protection to work? Do I put this into the UserPage _config.php?

RecaptchaField::$public_api_key = 'XXXXXX';
RecaptchaField::$private_api_key = 'XXXXXX';

Thanks for any assistance.


27 March 2010 at 4:08pm Forum Moderator, 5511 Posts

No you put that in your own mysite _config file. You should never edit a module (if you can avoid it).

Once you have added that then in the CMS form builder you should see a 'Spam Protector Field' option you can add to the form.


30 March 2010 at 2:00am Community Member, 107 Posts

I think you are referring to User Form Module. User Page is the module for user login information and registration.


30 March 2010 at 10:52am Forum Moderator, 5511 Posts

Ah sorry, I'm so used to people referring to UserForms in so many different ways.. Looking at the code ( I can't see any hooks for it. You could either directly edit the module or send me email to the module author asking for spam protection support.

I have added documentation on how module authors can adapt their forms to include the required hooks on


30 March 2010 at 11:05am Community Member, 107 Posts

Thanks for the response.