Jump to main content Jump to doc navigation

preHook.RampartRegister

To enable Rampart spam prevention on your Register forms, simply add preHook.RampartRegister as a preHook:

[[!Register?
    &preHooks=`math,preHook.RampartRegister`
    &moderatedResourceId=`217`
    &submittedResourceId=`194`
    &activationResourceId=`193`
    &submitVar=`login-register-btn`
]]

If you set the moderatedResourceId property, it will redirect registrations that have been flagged as possible spammers to that Resource instead of the normal &submittedResourceId page.

Rampart will then prevent spam registrations by flagging spam users and preventing their accounts from being activated until they are approved. You can approve flagged users in the Rampart Custom Manager Page, in the MODX admin. Once approved, the flagged user will receive their confirmation email and must confirm before being activated.

How Does it Work?

Rampart compares registrations against your ban list that you can edit in the Custom Manager Page. If a user tries to register and matches one of those ban patterns, it will prevent Registration at all.

It also checks with StopForumSpam for any flagged emails, and username+ip combinations. If they're found, it will mark the registration as 'flagged', and prevent activation of the user (and the sending of the activation email) until the registration has been approved by a moderator via the Custom Manager Page.

Available Properties

It has the following properties to be passed into the Register snippet call:

name description default
rptSpammerErrorMessage The field-specific message that will show when a banned user tries to sign up. Your account has been banned as a spammer. Sorry.

See Also

  1. Rampart.hook.RampartFormIt
  2. Rampart.hook.RampartQuip
  3. Rampart.preHook.RampartRegister

Support the team building MODX with a monthly donation.

The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.

Backers

  • modmore
  • STERC
  • Digital Penguin
  • Jens Wittmann – Gestaltung & Entwicklung
  • Fabian Christen
  • Dannevang Digital
  • Sepia River Studios
  • CrewMark
  • Chris Fickling
  • deJaya
  • Lefthandmedia
  • Murray Wood
  • eydolan
  • Following Sea
  • Anton Tarasov
  • Stéphane Jäggi
  • Raffy
  • A. Moreno
  • Snow Creative
  • Nick Clark
  • JT Skaggs
  • Helen
  • YJ
  • krisznet
  • Richard
  • Yanni

Budget

$301 per month—let's make that $500!

Learn more