Created
November 2, 2015 17:45
-
-
Save UndergroundLabs/d677f340d005e2f6f89d to your computer and use it in GitHub Desktop.
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 characters
<?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']); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment