2018-02-05 14:12:18 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Setup 2-factor authentication
|
|
|
|
*
|
|
|
|
* @category DMS
|
|
|
|
* @package SeedDMS
|
|
|
|
* @license GPL 2
|
|
|
|
* @version @version@
|
|
|
|
* @author Uwe Steinmann <uwe@steinmann.cx>
|
|
|
|
* @copyright Copyright (C) 2016 Uwe Steinmann
|
|
|
|
* @version Release: @package_version@
|
|
|
|
*/
|
|
|
|
|
2018-10-11 07:39:02 +00:00
|
|
|
if(!isset($settings))
|
|
|
|
require_once("../inc/inc.Settings.php");
|
2022-11-09 08:25:45 +00:00
|
|
|
require_once("inc/inc.Utils.php");
|
|
|
|
require_once("inc/inc.LogInit.php");
|
2018-10-11 07:39:02 +00:00
|
|
|
require_once("inc/inc.Language.php");
|
|
|
|
require_once("inc/inc.Init.php");
|
|
|
|
require_once("inc/inc.Extension.php");
|
|
|
|
require_once("inc/inc.DBInit.php");
|
|
|
|
require_once("inc/inc.ClassUI.php");
|
|
|
|
require_once("inc/inc.Authentication.php");
|
2018-02-05 14:12:18 +00:00
|
|
|
|
|
|
|
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
|
|
|
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
|
|
|
$accessop = new SeedDMS_AccessOperation($dms, $user, $settings);
|
|
|
|
|
|
|
|
if ($user->isGuest()) {
|
|
|
|
UI::exitError(getMLText("2_factor_auth"),getMLText("access_denied"));
|
|
|
|
}
|
|
|
|
|
|
|
|
if($view) {
|
|
|
|
$view->setParam('sitename', $settings->_siteName);
|
|
|
|
$view->setParam('enable2factauth', $settings->_enable2FactorAuthentication);
|
|
|
|
$view->setParam('accessobject', $accessop);
|
|
|
|
$view($_GET);
|
|
|
|
exit;
|
|
|
|
}
|