Fix Twig error on create account

This commit is contained in:
slawkens 2023-05-18 19:06:50 +02:00
parent 5ccfcd541e
commit 7e13b62b8f
2 changed files with 6 additions and 3 deletions

View File

@ -31,9 +31,6 @@ if($config['gzip_output'] && isset($_SERVER['HTTP_ACCEPT_ENCODING']) && strpos($
require_once SYSTEM . 'libs/cache.php';
$cache = Cache::getInstance();
// twig
require_once SYSTEM . 'twig.php';
// trim values we receive
if(isset($_POST))
{
@ -126,6 +123,9 @@ require_once SYSTEM . 'libs/pot/OTS.php';
$ots = POT::getInstance();
require_once SYSTEM . 'database.php';
// twig
require_once SYSTEM . 'twig.php';
define('USE_ACCOUNT_NAME', $db->hasColumn('accounts', 'name'));
// load vocation names
$tmp = '';

View File

@ -16,6 +16,9 @@ $twig = new Twig_Environment($twig_loader, array(
$twig_loader->addPath(PLUGINS);
$twig->addGlobal('logged', false);
$twig->addGlobal('account_logged', new OTS_Account());
if($dev_mode) {
$twig->addExtension(new Twig_DebugExtension());
}