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


Reply


5 Posts   865 Views

Avatar
davidm2010

Community Member, 107 Posts

26 March 2010 at 1:37pm

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';
SpamProtectorManager::set_spam_protector("RecaptchaProtector");

Thanks for any assistance.

Avatar
Willr

Forum Moderator, 5513 Posts

27 March 2010 at 4:08pm

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.

Avatar
davidm2010

Community Member, 107 Posts

30 March 2010 at 2:00am

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

Avatar
Willr

Forum Moderator, 5513 Posts

30 March 2010 at 10:52am

Ah sorry, I'm so used to people referring to UserForms in so many different ways.. Looking at the code (http://sunny.svnrepository.com/svn/sunny-side-up-general/userpage/code/RegisterAndEditDetailsPage.php) 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 http://doc.silverstripe.org/doku.php?id=modules:spamprotection#making_your_module_spam_protection_enabled

Avatar
davidm2010

Community Member, 107 Posts

30 March 2010 at 11:05am

Thanks for the response.