summaryrefslogtreecommitdiff
path: root/app/Auth
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-07-05 10:40:41 -0400
committerFrederic Guillot <fred@kanboard.net>2015-07-05 10:40:41 -0400
commit45774afafcae850ecf71ea90b426fffc2c6f0628 (patch)
treeeda76d88e4d5493b4e43e3a6db8e44e23a5960da /app/Auth
parente7b967d7432267d48e54d7775d0baf1e411178e7 (diff)
Do not rewrite remember me cookie for each request
Diffstat (limited to 'app/Auth')
-rw-r--r--app/Auth/RememberMe.php34
1 files changed, 5 insertions, 29 deletions
diff --git a/app/Auth/RememberMe.php b/app/Auth/RememberMe.php
index e8b20f37..eebf4f4b 100644
--- a/app/Auth/RememberMe.php
+++ b/app/Auth/RememberMe.php
@@ -119,31 +119,6 @@ class RememberMe extends Base
}
/**
- * Update the database and the cookie with a new sequence
- *
- * @access public
- */
- public function refresh()
- {
- $credentials = $this->readCookie();
-
- if ($credentials !== false) {
-
- $record = $this->find($credentials['token'], $credentials['sequence']);
-
- if ($record) {
-
- // Update the sequence
- $this->writeCookie(
- $record['token'],
- $this->update($record['token']),
- $record['expiration']
- );
- }
- }
- }
-
- /**
* Remove a session record
*
* @access public
@@ -197,9 +172,10 @@ class RememberMe extends Base
$this->cleanup($user_id);
- $this->db
- ->table(self::TABLE)
- ->insert(array(
+ $this
+ ->db
+ ->table(self::TABLE)
+ ->insert(array(
'user_id' => $user_id,
'ip' => $ip,
'user_agent' => $user_agent,
@@ -207,7 +183,7 @@ class RememberMe extends Base
'sequence' => $sequence,
'expiration' => $expiration,
'date_creation' => time(),
- ));
+ ));
return array(
'token' => $token,