diff --git a/core/module/config/config.php b/core/module/config/config.php
index 93c0beed..835490eb 100644
--- a/core/module/config/config.php
+++ b/core/module/config/config.php
@@ -483,7 +483,8 @@ class config extends common {
'connect' => [
'attempt' => $this->getInput('configConnectAttempt',helper::FILTER_INT),
'timeout' => $this->getInput('configConnectTimeout',helper::FILTER_INT),
- 'log' => $this->getInput('configConnectLog',helper::FILTER_BOOLEAN)
+ 'log' => $this->getInput('configConnectLog',helper::FILTER_BOOLEAN),
+ 'captcha' => $this->getInput('configConnectCaptcha',helper::FILTER_BOOLEAN)
]
]
]);
diff --git a/core/module/config/view/index/index.php b/core/module/config/view/index/index.php
index 97ec4a6a..25307562 100644
--- a/core/module/config/view/index/index.php
+++ b/core/module/config/view/index/index.php
@@ -94,7 +94,7 @@
'help' => 'Le fuseau horaire est utile au bon référencement'
]); ?>
-
+
$this->getData(['config', 'cookieConsent'])
]); ?>
@@ -499,6 +499,13 @@
]); ?>
+
+
+ $this->getData(['config', 'connect','captcha'])
+ ]); ?>
+
+
diff --git a/core/module/user/user.php b/core/module/user/user.php
index c4fb8ca5..77b0526c 100644
--- a/core/module/user/user.php
+++ b/core/module/user/user.php
@@ -334,6 +334,14 @@ class user extends common {
public function login() {
// Soumission du formulaire
if($this->isPost()) {
+ // Check la captcha
+ if(
+ $this->getInput('userLoginCaptcha', helper::FILTER_INT) !== $this->getInput('userLoginCaptchaFirstNumber', helper::FILTER_INT) + $this->getInput('userLoginCaptchaSecondNumber', helper::FILTER_INT))
+ {
+ self::$inputNotices['blogArticlecaptcha'] = 'Incorrect';
+ }
+
+ // Lire Id du compte
$userId = $this->getInput('userLoginId', helper::FILTER_ID, true);
/**
diff --git a/core/module/user/view/login/login.php b/core/module/user/view/login/login.php
index 3a1af756..e349d1d4 100644
--- a/core/module/user/view/login/login.php
+++ b/core/module/user/view/login/login.php
@@ -12,6 +12,13 @@
]); ?>
+ getData(['config', 'connect','captcha'])): ?>
+
+
'buttonGrey',
'href' => helper::baseUrl() . str_replace('_', '/', str_replace('__', '#', $this->getUrl(2))),
'ico' => 'left',
'value' => 'Annuler'