Refactor the session class.

This commit is contained in:
Taylor Otwell 2011-08-08 13:22:41 -05:00
parent 23e86c707d
commit 6590b54f44
1 changed files with 4 additions and 1 deletions

View File

@ -65,7 +65,10 @@ public static function load($id)
static::$session = array('id' => Str::random(40), 'data' => array()); 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(); static::$session['last_activity'] = time();
} }