summaryrefslogtreecommitdiff
path: root/app/Auth/Google.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Auth/Google.php')
-rw-r--r--app/Auth/Google.php14
1 files changed, 2 insertions, 12 deletions
diff --git a/app/Auth/Google.php b/app/Auth/Google.php
index 587ecde1..f779cfe5 100644
--- a/app/Auth/Google.php
+++ b/app/Auth/Google.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;
@@ -36,18 +36,8 @@ class Google extends Base
$user = $this->user->getByGoogleId($google_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;
}