diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-10-08 11:01:53 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-10-09 10:10:37 +0200 |
commit | 5122629bb0ff59a1688029d65e919ce31db8eced (patch) | |
tree | 367a89874edd75bc63c89fc0812a49ab5a9a64bc /lib/private/User | |
parent | f663154adfb81848295bbb6ddcc7ac9582c3a475 (diff) | |
download | nextcloud-server-5122629bb0ff59a1688029d65e919ce31db8eced.tar.gz nextcloud-server-5122629bb0ff59a1688029d65e919ce31db8eced.zip |
Make renewSessionToken return the new token
Avoids directly getting the token again. We just inserted it so it and
have all the info. So that query is just a waste.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/User')
-rw-r--r-- | lib/private/User/Session.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php index ba909c81053..842d19d8d54 100644 --- a/lib/private/User/Session.php +++ b/lib/private/User/Session.php @@ -861,7 +861,7 @@ class Session implements IUserSession, Emitter { try { $sessionId = $this->session->getId(); - $this->tokenProvider->renewSessionToken($oldSessionId, $sessionId); + $token = $this->tokenProvider->renewSessionToken($oldSessionId, $sessionId); } catch (SessionNotAvailableException $ex) { return false; } catch (InvalidTokenException $ex) { @@ -870,7 +870,6 @@ class Session implements IUserSession, Emitter { } $this->setMagicInCookie($user->getUID(), $newToken); - $token = $this->tokenProvider->getToken($sessionId); //login $this->setUser($user); |