Commit e9353227 authored by git's avatar git Committed by elachlan

Issue #2887225 by arunkumark, Mithun S, jayesh_makwana, chishah92, Sivaprasad...

Issue #2887225 by arunkumark, Mithun S, jayesh_makwana, chishah92, Sivaprasad C, andrey.troeglazov, elachlan: Coding Standard issues
parent 0941dc7a
......@@ -311,18 +311,18 @@ function image_captcha_after_build_process($element) {
$form_id = $element['#captcha_info']['form_id'];
$captcha_point = captcha_get_form_id_setting($form_id);
$is_image_captcha = false;
if(isset($captcha_point->captchaType) && $captcha_point->captchaType == 'image_captcha/Image'){
$is_image_captcha = true;
$is_image_captcha = FALSE;
if (isset($captcha_point->captchaType) && $captcha_point->captchaType == 'image_captcha/Image') {
$is_image_captcha = TRUE;
}
else if(isset($captcha_point->captchaType) && $captcha_point->captchaType == 'default'){
elseif (isset($captcha_point->captchaType) && $captcha_point->captchaType == 'default') {
$default_challenge = \Drupal::service('config.manager')
->getConfigFactory()
->get('captcha.settings')
->get('default_challenge');
if ($default_challenge == 'image_captcha/Image') {
$is_image_captcha = true;
}
$is_image_captcha = TRUE;
}
}
if ($is_image_captcha && isset($element['captcha_widgets']['captcha_image'])) {
......
<?php
/*
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
namespace Drupal\image_captcha\Controller;
/**
* To change template file, choose Tools | Templates and open it in the editor.
*/
use Drupal\Core\Controller\ControllerBase;
use Symfony\Component\HttpFoundation\JsonResponse;
use Drupal\Core\Database\Database;
......
Markdown is supported
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