refactoring classes.
This commit is contained in:
@@ -60,9 +60,15 @@ class Session {
|
||||
{
|
||||
static::$session = ( ! is_null($id)) ? static::driver()->load($id) : null;
|
||||
|
||||
if (static::invalid(static::$session)) static::$session = array('id' => Str::random(40), 'data' => array());
|
||||
if (static::invalid(static::$session))
|
||||
{
|
||||
static::$session = array('id' => Str::random(40), 'data' => array());
|
||||
}
|
||||
|
||||
if ( ! static::has('csrf_token')) static::put('csrf_token', Str::random(16));
|
||||
if ( ! static::has('csrf_token'))
|
||||
{
|
||||
static::put('csrf_token', Str::random(16));
|
||||
}
|
||||
|
||||
static::$session['last_activity'] = time();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user