summaryrefslogtreecommitdiff
path: root/app/Auth
diff options
context:
space:
mode:
Diffstat (limited to 'app/Auth')
-rw-r--r--app/Auth/Database.php5
-rw-r--r--app/Auth/GitHub.php5
-rw-r--r--app/Auth/Google.php5
-rw-r--r--app/Auth/Ldap.php6
-rw-r--r--app/Auth/RememberMe.php5
-rw-r--r--app/Auth/ReverseProxy.php5
6 files changed, 19 insertions, 12 deletions
diff --git a/app/Auth/Database.php b/app/Auth/Database.php
index 67881593..47dc8e6e 100644
--- a/app/Auth/Database.php
+++ b/app/Auth/Database.php
@@ -3,6 +3,7 @@
namespace Auth;
use Model\User;
+use Core\Request;
/**
* Database authentication
@@ -40,8 +41,8 @@ class Database extends Base
$this->lastLogin->create(
self::AUTH_NAME,
$user['id'],
- $this->user->getIpAddress(),
- $this->user->getUserAgent()
+ Request::getIpAddress(),
+ Request::getUserAgent()
);
return true;
diff --git a/app/Auth/GitHub.php b/app/Auth/GitHub.php
index 0910367a..096d4101 100644
--- a/app/Auth/GitHub.php
+++ b/app/Auth/GitHub.php
@@ -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;
diff --git a/app/Auth/Google.php b/app/Auth/Google.php
index aeeab563..2bed5b09 100644
--- a/app/Auth/Google.php
+++ b/app/Auth/Google.php
@@ -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;
@@ -45,8 +46,8 @@ class Google extends Base
$this->lastLogin->create(
self::AUTH_NAME,
$user['id'],
- $this->user->getIpAddress(),
- $this->user->getUserAgent()
+ Request::getIpAddress(),
+ Request::getUserAgent()
);
return true;
diff --git a/app/Auth/Ldap.php b/app/Auth/Ldap.php
index 63d495fa..4f20998f 100644
--- a/app/Auth/Ldap.php
+++ b/app/Auth/Ldap.php
@@ -2,6 +2,8 @@
namespace Auth;
+use Core\Request;
+
/**
* LDAP model
*
@@ -58,8 +60,8 @@ class Ldap extends Base
$this->lastLogin->create(
self::AUTH_NAME,
$user['id'],
- $this->user->getIpAddress(),
- $this->user->getUserAgent()
+ Request::getIpAddress(),
+ Request::getUserAgent()
);
return true;
diff --git a/app/Auth/RememberMe.php b/app/Auth/RememberMe.php
index 50e0bcef..380abbed 100644
--- a/app/Auth/RememberMe.php
+++ b/app/Auth/RememberMe.php
@@ -2,6 +2,7 @@
namespace Auth;
+use Core\Request;
use Core\Security;
use Core\Tool;
@@ -107,8 +108,8 @@ class RememberMe extends Base
$this->lastLogin->create(
self::AUTH_NAME,
$this->acl->getUserId(),
- $this->user->getIpAddress(),
- $this->user->getUserAgent()
+ Request::getIpAddress(),
+ Request::getUserAgent()
);
return true;
diff --git a/app/Auth/ReverseProxy.php b/app/Auth/ReverseProxy.php
index 6880f5fa..5aca881a 100644
--- a/app/Auth/ReverseProxy.php
+++ b/app/Auth/ReverseProxy.php
@@ -2,6 +2,7 @@
namespace Auth;
+use Core\Request;
use Core\Security;
/**
@@ -44,8 +45,8 @@ class ReverseProxy extends Base
$this->lastLogin->create(
self::AUTH_NAME,
$user['id'],
- $this->user->getIpAddress(),
- $this->user->getUserAgent()
+ Request::getIpAddress(),
+ Request::getUserAgent()
);
return true;