diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-10-25 15:05:19 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-10-25 15:05:19 -0400 |
commit | 6756ef2301a5f624941b947ec9effd34b467de9a (patch) | |
tree | c93fe266cdef7ceef2234bf1cde61b5c4b738084 /app/Model | |
parent | 06e9486c59831cdd1630647ea7474a39879a37da (diff) |
Move token generation to Security namespace
Diffstat (limited to 'app/Model')
-rw-r--r-- | app/Model/Config.php | 4 | ||||
-rw-r--r-- | app/Model/Project.php | 4 | ||||
-rw-r--r-- | app/Model/User.php | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/app/Model/Config.php b/app/Model/Config.php index cf634f80..3b90f58d 100644 --- a/app/Model/Config.php +++ b/app/Model/Config.php @@ -3,7 +3,7 @@ namespace Kanboard\Model; use Kanboard\Core\Translator; -use Kanboard\Core\Security; +use Kanboard\Core\Security\Token; use Kanboard\Core\Session; /** @@ -265,7 +265,7 @@ class Config extends Setting */ public function regenerateToken($option) { - $this->save(array($option => Security::generateToken())); + $this->save(array($option => Token::getToken())); } /** diff --git a/app/Model/Project.php b/app/Model/Project.php index b767af26..9e30a9b8 100644 --- a/app/Model/Project.php +++ b/app/Model/Project.php @@ -4,7 +4,7 @@ namespace Kanboard\Model; use SimpleValidator\Validator; use SimpleValidator\Validators; -use Kanboard\Core\Security; +use Kanboard\Core\Security\Token; /** * Project model @@ -491,7 +491,7 @@ class Project extends Base $this->db ->table(self::TABLE) ->eq('id', $project_id) - ->save(array('is_public' => 1, 'token' => Security::generateToken())); + ->save(array('is_public' => 1, 'token' => Token::getToken())); } /** diff --git a/app/Model/User.php b/app/Model/User.php index 6e7e94e0..dc00c0c5 100644 --- a/app/Model/User.php +++ b/app/Model/User.php @@ -6,7 +6,7 @@ use PicoDb\Database; use SimpleValidator\Validator; use SimpleValidator\Validators; use Kanboard\Core\Session; -use Kanboard\Core\Security; +use Kanboard\Core\Security\Token; /** * User model @@ -383,7 +383,7 @@ class User extends Base return $this->db ->table(self::TABLE) ->eq('id', $user_id) - ->save(array('token' => Security::generateToken())); + ->save(array('token' => Token::getToken())); } /** |