Skip to content
Snippets Groups Projects
Commit 381c3151 authored by Chris Hallberg's avatar Chris Hallberg Committed by Demian Katz
Browse files

Switch to ZendService-Recaptcha. (#912)

parent 1118bc64
Branches
Tags
No related merge requests found
......@@ -124,7 +124,7 @@ class Recaptcha extends AbstractPlugin
} catch (\ZendService\ReCaptcha\Exception $e) {
$response = false;
}
$captchaPassed = $response && $response->isSuccess();
$captchaPassed = $response && $response->isValid();
if (!$captchaPassed && $this->errorMode != 'none') {
if ($this->errorMode == 'flash') {
$this->getController()->flashMessenger()
......
......@@ -532,9 +532,7 @@ class Factory
$options['theme'] = $config->Captcha->theme;
}
$recaptcha = new \VuFind\Service\ReCaptcha(
$siteKey, $secretKey,
new \LosReCaptcha\Service\Request\ZendHttpClient($httpClient),
['ssl' => true], $options
$siteKey, $secretKey, ['ssl' => true], $options, null, $httpClient
);
return $recaptcha;
......
......@@ -36,7 +36,7 @@ namespace VuFind\Service;
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @link https://vufind.org/wiki/development Wiki
*/
class ReCaptcha extends \LosReCaptcha\Service\ReCaptcha
class ReCaptcha extends \ZendService\ReCaptcha\ReCaptcha
{
/**
* Get the HTML code for the captcha
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment