Move methods getIpAddress() and getUserAgent() to the Request class

This commit is contained in:
Frédéric Guillot
2014-09-28 09:19:19 -04:00
parent 4aa99e9492
commit 9003f830ef
10 changed files with 84 additions and 73 deletions

View File

@@ -4,6 +4,7 @@ namespace Auth;
require __DIR__.'/../../vendor/OAuth/bootstrap.php';
use Core\Request;
use OAuth\Common\Storage\Session;
use OAuth\Common\Consumer\Credentials;
use OAuth\Common\Http\Uri\UriFactory;
@@ -44,8 +45,8 @@ class GitHub extends Base
$this->lastLogin->create(
self::AUTH_NAME,
$user['id'],
$this->user->getIpAddress(),
$this->user->getUserAgent()
Request::getIpAddress(),
Request::getUserAgent()
);
return true;