Created
November 2, 2015 17:45
Revisions
-
UndergroundLabs created this gist
Nov 2, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ <?php namespace QuizApp\Services; class UserSessionService { private $app; private $container; public function __construct($app, $container) { $this->app = $app; $this->container = $container; } public function create($fbid, $firstname, $lastname) { $_SESSION['user'] = array( 'fbid' => $fbid, 'firstname' => $firstname, 'lastname' => $lastname ); } public function destroy() { unset($_SESSION['user']); } }