public static function checkCaptcha($namespace = null, $captcha = '') { if (!$namespace) { $namespace = JFactory::getApplication()->input->getString('captcha_namespace', ''); } if (!$captcha) { $captcha = JFactory::getApplication()->input->getString('security_code', ''); } if ($captcha && $namespace) { $secureImage = JUDirectoryFrontHelperCaptcha::initCaptcha($namespace); if ($secureImage->check($captcha, true) == true) { return true; } } return false; }