mirror of
https://github.com/slawkens/myaac.git
synced 2025-05-18 11:49:22 +02:00
Fix twig variables: logged + account_logged being not set directly after login
This commit is contained in:
parent
7c92d1c197
commit
1e9b10d648
@ -138,6 +138,9 @@ $ots = POT::getInstance();
|
|||||||
$eloquentConnection = null;
|
$eloquentConnection = null;
|
||||||
require_once SYSTEM . 'database.php';
|
require_once SYSTEM . 'database.php';
|
||||||
|
|
||||||
|
$twig->addGlobal('logged', false);
|
||||||
|
$twig->addGlobal('account_logged', new \OTS_Account());
|
||||||
|
|
||||||
// verify myaac tables exists in database
|
// verify myaac tables exists in database
|
||||||
if(!defined('MYAAC_INSTALL') && !$db->hasTable('myaac_account_actions')) {
|
if(!defined('MYAAC_INSTALL') && !$db->hasTable('myaac_account_actions')) {
|
||||||
throw new RuntimeException('Seems that the table myaac_account_actions of MyAAC doesn\'t exist in the database. This is a fatal error. You can try to reinstall MyAAC by visiting ' . (IS_CLI ? 'http://your-ip.com/' : BASE_URL) . 'install');
|
throw new RuntimeException('Seems that the table myaac_account_actions of MyAAC doesn\'t exist in the database. This is a fatal error. You can try to reinstall MyAAC by visiting ' . (IS_CLI ? 'http://your-ip.com/' : BASE_URL) . 'install');
|
||||||
|
@ -95,3 +95,8 @@ else {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$hooks->trigger(HOOK_ACCOUNT_LOGIN_POST);
|
$hooks->trigger(HOOK_ACCOUNT_LOGIN_POST);
|
||||||
|
|
||||||
|
if($logged) {
|
||||||
|
$twig->addGlobal('logged', true);
|
||||||
|
$twig->addGlobal('account_logged', $account_logged);
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user