Rename all models
This commit is contained in:
@@ -5,7 +5,7 @@ namespace Kanboard\Auth;
|
||||
use Kanboard\Core\Base;
|
||||
use Kanboard\Core\Security\PasswordAuthenticationProviderInterface;
|
||||
use Kanboard\Core\Security\SessionCheckProviderInterface;
|
||||
use Kanboard\Model\User;
|
||||
use Kanboard\Model\UserModel;
|
||||
use Kanboard\User\DatabaseUserProvider;
|
||||
|
||||
/**
|
||||
@@ -60,7 +60,7 @@ class DatabaseAuth extends Base implements PasswordAuthenticationProviderInterfa
|
||||
public function authenticate()
|
||||
{
|
||||
$user = $this->db
|
||||
->table(User::TABLE)
|
||||
->table(UserModel::TABLE)
|
||||
->columns('id', 'password')
|
||||
->eq('username', $this->username)
|
||||
->eq('disable_login_form', 0)
|
||||
@@ -84,7 +84,7 @@ class DatabaseAuth extends Base implements PasswordAuthenticationProviderInterfa
|
||||
*/
|
||||
public function isValidSession()
|
||||
{
|
||||
return $this->user->isActive($this->userSession->getId());
|
||||
return $this->userModel->isActive($this->userSession->getId());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -44,16 +44,16 @@ class RememberMeAuth extends Base implements PreAuthenticationProviderInterface
|
||||
$credentials = $this->rememberMeCookie->read();
|
||||
|
||||
if ($credentials !== false) {
|
||||
$session = $this->rememberMeSession->find($credentials['token'], $credentials['sequence']);
|
||||
$session = $this->rememberMeSessionModel->find($credentials['token'], $credentials['sequence']);
|
||||
|
||||
if (! empty($session)) {
|
||||
$this->rememberMeCookie->write(
|
||||
$session['token'],
|
||||
$this->rememberMeSession->updateSequence($session['token']),
|
||||
$this->rememberMeSessionModel->updateSequence($session['token']),
|
||||
$session['expiration']
|
||||
);
|
||||
|
||||
$this->userInfo = $this->user->getById($session['user_id']);
|
||||
$this->userInfo = $this->userModel->getById($session['user_id']);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user