mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-12-24 10:31:34 +00:00
40 lines
1.1 KiB
PHP
40 lines
1.1 KiB
PHP
<?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@
|
|
*/
|
|
|
|
if(!isset($settings))
|
|
require_once("../inc/inc.Settings.php");
|
|
require_once("inc/inc.Utils.php");
|
|
require_once("inc/inc.LogInit.php");
|
|
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");
|
|
|
|
$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;
|
|
}
|