Skip to content

Instantly share code, notes, and snippets.

@coderberry
Created October 28, 2010 16:11
Show Gist options
  • Select an option

  • Save coderberry/651707 to your computer and use it in GitHub Desktop.

Select an option

Save coderberry/651707 to your computer and use it in GitHub Desktop.
AuthController.groovy
def pickup = {
def captchaOK = true
def pickupCode = params.pickupCode ?: ''
def lastFourDigits = params.lastFourDigits ?: ''
// Determine if the captcha is picked correctly
if (params.captchaSelection != session.selectedCaptchaText) {
captchaOK = false
}
if (pickupCode || lastFourDigits) {
if (captchaOK) { // They selected the correct Captcha image
...
} else {
flash.message = "You did not click the correct image below. Please Try Again."
}
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment