move checkout controller trait

This commit is contained in:
Daniel Seifert 2022-11-02 12:03:38 +01:00
bovenliggende 28035cca52
commit db60ca12b3
Getekend door: DanielS
GPG sleutel-ID: 8A7C4C6ED1915C6F
4 gewijzigde bestanden met toevoegingen van 14 en 8 verwijderingen

Bestand weergeven

@ -13,7 +13,7 @@
* @link http://www.oxidmodule.com * @link http://www.oxidmodule.com
*/ */
namespace D3\Webauthn\Modules\Application\Controller; namespace D3\Webauthn\Application\Controller\Traits;
use D3\Webauthn\Application\Model\Webauthn; use D3\Webauthn\Application\Model\Webauthn;
use D3\Webauthn\Application\Model\WebauthnConf; use D3\Webauthn\Application\Model\WebauthnConf;
@ -25,13 +25,13 @@ use OxidEsales\Eshop\Core\Session;
use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface; use Psr\Container\NotFoundExceptionInterface;
trait d3_webauthn_getUserTrait trait checkoutGetUserTrait
{ {
/** /**
* @return bool|object|User * @return bool|object|User
* @throws Exception
* @throws DoctrineException
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws DoctrineException
* @throws Exception
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */
public function getUser() public function getUser()
@ -39,7 +39,7 @@ trait d3_webauthn_getUserTrait
$user = parent::getUser(); $user = parent::getUser();
if ($user && $user->getId()) { if ($user && $user->getId()) {
$webauthn = $this->d3GetWebauthnpObject(); $webauthn = $this->d3GetWebauthnObject();
if ($webauthn->isActive($user->getId()) if ($webauthn->isActive($user->getId())
&& !$this->d3GetSessionObject()->getVariable(WebauthnConf::WEBAUTHN_SESSION_AUTH) && !$this->d3GetSessionObject()->getVariable(WebauthnConf::WEBAUTHN_SESSION_AUTH)

Bestand weergeven

@ -15,7 +15,9 @@
namespace D3\Webauthn\Modules\Application\Controller; namespace D3\Webauthn\Modules\Application\Controller;
use D3\Webauthn\Application\Controller\Traits\checkoutGetUserTrait;
class d3_webauthn_OrderController extends d3_webauthn_OrderController_parent class d3_webauthn_OrderController extends d3_webauthn_OrderController_parent
{ {
use d3_webauthn_getUserTrait; use checkoutGetUserTrait;
} }

Bestand weergeven

@ -15,7 +15,9 @@
namespace D3\Webauthn\Modules\Application\Controller; namespace D3\Webauthn\Modules\Application\Controller;
use D3\Webauthn\Application\Controller\Traits\checkoutGetUserTrait;
class d3_webauthn_PaymentController extends d3_webauthn_PaymentController_parent class d3_webauthn_PaymentController extends d3_webauthn_PaymentController_parent
{ {
use d3_webauthn_getUserTrait; use checkoutGetUserTrait;
} }

Bestand weergeven

@ -15,7 +15,9 @@
namespace D3\Webauthn\Modules\Application\Controller; namespace D3\Webauthn\Modules\Application\Controller;
use D3\Webauthn\Application\Controller\Traits\checkoutGetUserTrait;
class d3_webauthn_UserController extends d3_webauthn_UserController_parent class d3_webauthn_UserController extends d3_webauthn_UserController_parent
{ {
use d3_webauthn_getUserTrait; use checkoutGetUserTrait;
} }