Skip to content

Instantly share code, notes, and snippets.

@UndergroundLabs
Created November 2, 2015 17:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save UndergroundLabs/d677f340d005e2f6f89d to your computer and use it in GitHub Desktop.
Save UndergroundLabs/d677f340d005e2f6f89d to your computer and use it in GitHub Desktop.
<?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