move checkout controller trait

This commit is contained in:
Daniel Seifert 2022-11-02 12:03:38 +01:00
parent 28035cca52
commit db60ca12b3
Signed by: DanielS
GPG Key ID: 8A7C4C6ED1915C6F
4 changed files with 14 additions and 8 deletions

View File

@ -13,7 +13,7 @@
* @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\WebauthnConf;
@ -25,13 +25,13 @@ use OxidEsales\Eshop\Core\Session;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
trait d3_webauthn_getUserTrait
trait checkoutGetUserTrait
{
/**
* @return bool|object|User
* @throws Exception
* @throws DoctrineException
* @throws ContainerExceptionInterface
* @throws DoctrineException
* @throws Exception
* @throws NotFoundExceptionInterface
*/
public function getUser()
@ -39,7 +39,7 @@ trait d3_webauthn_getUserTrait
$user = parent::getUser();
if ($user && $user->getId()) {
$webauthn = $this->d3GetWebauthnpObject();
$webauthn = $this->d3GetWebauthnObject();
if ($webauthn->isActive($user->getId())
&& !$this->d3GetSessionObject()->getVariable(WebauthnConf::WEBAUTHN_SESSION_AUTH)

View File

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

View File

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

View File

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