close #53 switch to "file based" to "DB based" SESSION handling
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user