Move methods getIpAddress() and getUserAgent() to the Request class
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user