close #53 switch to "file based" to "DB based" SESSION handling

This commit is contained in:
Exodus4D
2015-10-18 14:27:15 +02:00
parent 674faf8d2c
commit 50c97f96f8
3 changed files with 14 additions and 3 deletions

View File

@@ -45,6 +45,9 @@ class Controller {
*/
function beforeroute($f3) {
// init user session
$this->initSession();
// check if user is in game
$f3->set('isIngame', self::isIGB() );
@@ -71,6 +74,14 @@ class Controller {
return DB\Database::instance()->getDB($database);
}
/**
* init new Session handler
*/
protected function initSession(){
// init DB Session (not file based)
new \DB\SQL\Session($this->getDB('PF'));
}
/**
* get current user model
* @param int $ttl