Initialization Function checkCaptcha()

protected final function checkCaptcha()

Description

This function checks a POST submission to see if a CAPTCHA is correct.

To use it you must have previously included a CAPTCHA on a form using the $this->captcha() initialization function.

Where You Can Use It

Can be used in your plugin's init() method, from Zenario 7.0.0 onwards.

Example

if ($this->checkCaptcha())
    //Do something...
} else {
    //Show an error message...
}