diff options
Diffstat (limited to 'app/Auth/RememberMe.php')
| -rw-r--r-- | app/Auth/RememberMe.php | 38 |
1 files changed, 7 insertions, 31 deletions
diff --git a/app/Auth/RememberMe.php b/app/Auth/RememberMe.php index e8b20f37..54e60422 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, @@ -306,7 +282,7 @@ class RememberMe extends Base self::COOKIE_NAME, $this->encodeCookie($token, $sequence), $expiration, - BASE_URL_DIRECTORY, + $this->helper->url->dir(), null, Request::isHTTPS(), true @@ -339,7 +315,7 @@ class RememberMe extends Base self::COOKIE_NAME, '', time() - 3600, - BASE_URL_DIRECTORY, + $this->helper->url->dir(), null, Request::isHTTPS(), true |
