mirror of
https://git.d3data.de/3rdParty/captcha-module.git
synced 2024-11-14 19:03:15 +01:00
59 lines
1.3 KiB
PHP
59 lines
1.3 KiB
PHP
<?php
|
|
/**
|
|
* #PHPHEADER_OECAPTCHA_LICENSE_INFORMATION#
|
|
*/
|
|
|
|
/**
|
|
* Article detailed information widget.
|
|
*/
|
|
class oeUserComponent extends oeUserComponent_parent
|
|
{
|
|
/**
|
|
* Class handling CAPTCHA image.
|
|
*
|
|
* @var object
|
|
*/
|
|
protected $captcha = null;
|
|
|
|
/**
|
|
* 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;
|
|
}
|
|
|
|
public function createUser()
|
|
{
|
|
/* START check for Amazon Pay - no Captcha */
|
|
ob_start();
|
|
debug_print_backtrace();
|
|
$trace = ob_get_contents();
|
|
ob_end_clean();
|
|
|
|
if(str_contains($trace, 'initAmazonPayExpress'))
|
|
{
|
|
return parent::createUser();
|
|
}
|
|
/* END check for Amazon Pay - no Captcha /
|
|
|
|
/* START check for PayPal Checkout - no Captcha */
|
|
if(\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('fnc') == 'approveOrder')
|
|
{
|
|
return parent::createUser();
|
|
}
|
|
/* START check for PayPal Checkout - no Captcha */
|
|
|
|
if (!$this->getCaptcha()->passCaptcha()) {
|
|
return false;
|
|
}
|
|
|
|
return parent::createUser();
|
|
}
|
|
}
|