oxtotp/src/Modules/Application/Model/d3_totp_user.php

48 lines
1.1 KiB
PHP
Raw Normal View History

2018-10-23 21:50:36 +02:00
<?php
/**
2022-09-26 15:22:26 +02:00
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* https://www.d3data.de
2018-10-23 21:50:36 +02:00
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
2022-09-26 15:22:26 +02:00
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
2018-10-23 21:50:36 +02:00
*/
namespace D3\Totp\Modules\Application\Model;
use D3\Totp\Application\Model\d3totp;
use Doctrine\DBAL\DBALException;
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
2018-10-23 21:50:36 +02:00
use OxidEsales\Eshop\Core\Registry;
2019-08-08 23:50:09 +02:00
use OxidEsales\Eshop\Core\Session;
2018-10-23 21:50:36 +02:00
class d3_totp_user extends d3_totp_user_parent
{
public function logout()
{
$return = parent::logout();
2019-08-08 23:50:09 +02:00
$this->d3GetSession()->deleteVariable(d3totp::TOTP_SESSION_VARNAME);
2018-10-23 21:50:36 +02:00
return $return;
}
/**
* @return d3totp
*/
public function d3getTotp()
{
2019-08-11 00:33:59 +02:00
return oxNew(d3totp::class);
}
2019-08-08 23:50:09 +02:00
/**
* @return Session
*/
public function d3GetSession()
{
return Registry::getSession();
}
2018-10-17 12:50:10 +02:00
}