mirror of
https://git.d3data.de/3rdParty/captcha-module.git
synced 2024-11-04 22:26:56 +01:00
add check for user
This commit is contained in:
parent
0c74177b15
commit
ae340f8569
52
controllers/oecaptchauser.php
Normal file
52
controllers/oecaptchauser.php
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* #PHPHEADER_OECAPTCHA_LICENSE_INFORMATION#
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Article suggestion page.
|
||||||
|
* Collects some article base information, sets default recomendation text,
|
||||||
|
* sends suggestion mail to user.
|
||||||
|
*/
|
||||||
|
class oeCaptchaUser extends oeCaptchaUser_parent
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Class handling CAPTCHA image.
|
||||||
|
*
|
||||||
|
* @var object
|
||||||
|
*/
|
||||||
|
protected $captcha = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sends product suggestion mail and returns a URL according to
|
||||||
|
* URL formatting rules.
|
||||||
|
*
|
||||||
|
* Template variables:
|
||||||
|
* <b>editval</b>, <b>error</b>
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
*/
|
||||||
|
public function send()
|
||||||
|
{
|
||||||
|
// spam spider prevension
|
||||||
|
if (!$this->getCaptcha()->passCaptcha()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return parent::send();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Template variable getter. Returns object of handling CAPTCHA image
|
||||||
|
*
|
||||||
|
* @return object
|
||||||
|
*/
|
||||||
|
public function getCaptcha()
|
||||||
|
{
|
||||||
|
if ($this->captcha === null) {
|
||||||
|
$this->captcha = oxNew('oeCaptcha');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->captcha;
|
||||||
|
}
|
||||||
|
}
|
@ -46,7 +46,8 @@ $aModule = array(
|
|||||||
'suggest' => 'oe/captcha/controllers/oecaptchasuggest',
|
'suggest' => 'oe/captcha/controllers/oecaptchasuggest',
|
||||||
'oxwarticledetails' => 'oe/captcha/application/component/widget/oecaptchawarticledetails',
|
'oxwarticledetails' => 'oe/captcha/application/component/widget/oecaptchawarticledetails',
|
||||||
\OxidEsales\Eshop\Application\Component\UserComponent::class => 'oe/captcha/application/component/oeusercomponent',
|
\OxidEsales\Eshop\Application\Component\UserComponent::class => 'oe/captcha/application/component/oeusercomponent',
|
||||||
'register' => 'oe/captcha/controllers/oecaptcharegister'
|
'register' => 'oe/captcha/controllers/oecaptcharegister',
|
||||||
|
'user' => 'oe/captcha/controllers/oecaptchauser'
|
||||||
),
|
),
|
||||||
'files' => array(
|
'files' => array(
|
||||||
'oecaptcha' => 'oe/captcha/core/oecaptcha.php',
|
'oecaptcha' => 'oe/captcha/core/oecaptcha.php',
|
||||||
|
Loading…
Reference in New Issue
Block a user