diff options
Diffstat (limited to 'lib/private/Authentication/Token/DefaultTokenProvider.php')
-rw-r--r-- | lib/private/Authentication/Token/DefaultTokenProvider.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/Authentication/Token/DefaultTokenProvider.php b/lib/private/Authentication/Token/DefaultTokenProvider.php index b3564e0e81b..a4e44f3c5d2 100644 --- a/lib/private/Authentication/Token/DefaultTokenProvider.php +++ b/lib/private/Authentication/Token/DefaultTokenProvider.php @@ -61,14 +61,16 @@ class DefaultTokenProvider implements IProvider { * @param string $token * @param string $uid * @param string $password + * @apram int $type token type * @return DefaultToken */ - public function generateToken($token, $uid, $password, $name) { + public function generateToken($token, $uid, $password, $name, $type = IToken::TEMPORARY_TOKEN) { $dbToken = new DefaultToken(); $dbToken->setUid($uid); $dbToken->setPassword($this->encryptPassword($password, $token)); $dbToken->setName($name); $dbToken->setToken($this->hashToken($token)); + $dbToken->setType($type); $dbToken->setLastActivity(time()); $this->mapper->insert($dbToken); |