Browse Source

Merge pull request #29682 from nextcloud/bugfix/29678/fix-missing-token-update

Fix missing token update
pull/29689/head
Joas Schilling 5 years ago
committed by GitHub
parent
commit
f9f02ef45c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      lib/private/User/Session.php
  2. 4
      tests/lib/User/SessionTest.php

2
lib/private/User/Session.php

@ -750,6 +750,7 @@ class Session implements IUserSession, Emitter {
}
$dbToken->setLastCheck($now);
$this->tokenProvider->updateToken($dbToken);
return true;
}
@ -767,6 +768,7 @@ class Session implements IUserSession, Emitter {
}
$dbToken->setLastCheck($now);
$this->tokenProvider->updateToken($dbToken);
return true;
}

4
tests/lib/User/SessionTest.php

@ -1264,7 +1264,7 @@ class SessionTest extends \Test\TestCase {
$mapper->expects($this->any())
->method('getToken')
->willReturn($token);
$mapper->expects($this->once())
$mapper->expects($this->exactly(2))
->method('update');
$request
->expects($this->any())
@ -1314,7 +1314,7 @@ class SessionTest extends \Test\TestCase {
$mapper->expects($this->any())
->method('getToken')
->willReturn($token);
$mapper->expects($this->never())
$mapper->expects($this->once())
->method('update');
$request
->expects($this->any())

Loading…
Cancel
Save