Skip to content

Commit

Permalink
Fix Twig error on create account
Browse files Browse the repository at this point in the history
  • Loading branch information
slawkens committed May 18, 2023
1 parent 5ccfcd5 commit 7e13b62
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions system/init.php
Expand Up @@ -31,9 +31,6 @@
require_once SYSTEM . 'libs/cache.php';
$cache = Cache::getInstance();

// twig
require_once SYSTEM . 'twig.php';

// trim values we receive
if(isset($_POST))
{
Expand Down Expand Up @@ -126,6 +123,9 @@
$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 = '';
Expand Down
3 changes: 3 additions & 0 deletions system/twig.php
Expand Up @@ -16,6 +16,9 @@

$twig_loader->addPath(PLUGINS);

$twig->addGlobal('logged', false);
$twig->addGlobal('account_logged', new OTS_Account());

if($dev_mode) {
$twig->addExtension(new Twig_DebugExtension());
}
Expand Down

0 comments on commit 7e13b62

Please sign in to comment.