diff options
Diffstat (limited to 'lib/private/User/Session.php')
-rw-r--r-- | lib/private/User/Session.php | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php index 0cebb3e0613..89148dcf8ec 100644 --- a/lib/private/User/Session.php +++ b/lib/private/User/Session.php @@ -237,8 +237,7 @@ class Session implements IUserSession, Emitter { $this->session->set('last_login_check', $now); } - // Session is valid, so the token can be refreshed - $this->updateToken($token); + $this->tokenProvider->updateTokenActivity($token); } /** @@ -541,7 +540,7 @@ class Session implements IUserSession, Emitter { $result = $this->loginWithToken($token->getUID()); if ($result) { // Login success - $this->updateToken($token); + $this->tokenProvider->updateTokenActivity($token); return true; } } @@ -552,19 +551,6 @@ class Session implements IUserSession, Emitter { } /** - * @param IToken $token - */ - private function updateToken(IToken $token) { - // To save unnecessary DB queries, this is only done once a minute - $lastTokenUpdate = $this->session->get('last_token_update') ? : 0; - $now = $this->timeFacory->getTime(); - if ($lastTokenUpdate < ($now - 60)) { - $this->tokenProvider->updateToken($token); - $this->session->set('last_token_update', $now); - } - } - - /** * Tries to login the user with auth token header * * @todo check remember me cookie |