From 88d84073aecbe8bdc5f10825b6d7ca6b81c5f7b1 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sat, 27 Dec 2014 21:11:11 -0500 Subject: Add more subscribers --- app/Auth/GitHub.php | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'app/Auth/GitHub.php') diff --git a/app/Auth/GitHub.php b/app/Auth/GitHub.php index 034f9260..a785c494 100644 --- a/app/Auth/GitHub.php +++ b/app/Auth/GitHub.php @@ -2,7 +2,7 @@ namespace Auth; -use Core\Request; +use Event\AuthEvent; use OAuth\Common\Storage\Session; use OAuth\Common\Consumer\Credentials; use OAuth\Common\Http\Uri\UriFactory; @@ -35,18 +35,8 @@ class GitHub extends Base $user = $this->user->getByGitHubId($github_id); if ($user) { - - // Create the user session $this->user->updateSession($user); - - // Update login history - $this->lastLogin->create( - self::AUTH_NAME, - $user['id'], - Request::getIpAddress(), - Request::getUserAgent() - ); - + $this->container['dispatcher']->dispatch('auth.success', new AuthEvent(self::AUTH_NAME, $user['id'])); return true; } -- cgit v1.2.3