summaryrefslogtreecommitdiff
path: root/app/Model/Authentication.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-09-28 09:19:19 -0400
committerFrédéric Guillot <fred@kanboard.net>2014-09-28 09:19:19 -0400
commit9003f830efcdc92865754a5d62e9fd2fea172af7 (patch)
tree52f24c0ac1d0c701b7562087bee33b2a2ad6e281 /app/Model/Authentication.php
parent4aa99e949224279ad64be26806e2657e66bf5adf (diff)
Move methods getIpAddress() and getUserAgent() to the Request class
Diffstat (limited to 'app/Model/Authentication.php')
-rw-r--r--app/Model/Authentication.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/Model/Authentication.php b/app/Model/Authentication.php
index 6efc5687..b9ebcfe2 100644
--- a/app/Model/Authentication.php
+++ b/app/Model/Authentication.php
@@ -2,6 +2,7 @@
namespace Model;
+use Core\Request;
use Auth\Database;
use SimpleValidator\Validator;
use SimpleValidator\Validators;
@@ -117,7 +118,7 @@ class Authentication extends Base
if (! empty($values['remember_me'])) {
$credentials = $this->backend('rememberMe')
- ->create($this->acl->getUserId(), $this->user->getIpAddress(), $this->user->getUserAgent());
+ ->create($this->acl->getUserId(), Request::getIpAddress(), Request::getUserAgent());
$this->backend('rememberMe')->writeCookie($credentials['token'], $credentials['sequence'], $credentials['expiration']);
}