summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-02-16 20:22:47 +0100
committerLukas Reschke <lukas@owncloud.com>2015-02-16 20:22:47 +0100
commit7f624188a77534856ecd53ac1d303ce5358e681e (patch)
tree4ed005530fc0096241a1993da70fdeb1e09ba196
parent1a4b9b0c928d1dc9d08413c5cc79a8e2995fa226 (diff)
parent4910f3e2027c1521e8468a0b0273fec89804ca1e (diff)
downloadnextcloud-server-7f624188a77534856ecd53ac1d303ce5358e681e.tar.gz
nextcloud-server-7f624188a77534856ecd53ac1d303ce5358e681e.zip
Merge pull request #14261 from owncloud/fix-last-login-master
Return milliseconds instead of seconds for lastLogin - refs #14005
-rw-r--r--settings/controller/userscontroller.php2
-rw-r--r--tests/settings/controller/userscontrollertest.php22
2 files changed, 12 insertions, 12 deletions
diff --git a/settings/controller/userscontroller.php b/settings/controller/userscontroller.php
index 80fb81600df..a20cbb4050a 100644
--- a/settings/controller/userscontroller.php
+++ b/settings/controller/userscontroller.php
@@ -154,7 +154,7 @@ class UsersController extends Controller {
'subadmin' => \OC_SubAdmin::getSubAdminsGroups($user->getUID()),
'quota' => $this->config->getUserValue($user->getUID(), 'files', 'quota', 'default'),
'storageLocation' => $user->getHome(),
- 'lastLogin' => $user->getLastLogin(),
+ 'lastLogin' => $user->getLastLogin() * 1000,
'backend' => $user->getBackendClassName(),
'email' => $this->config->getUserValue($user->getUID(), 'settings', 'email', ''),
'isRestoreDisabled' => !$restorePossible,
diff --git a/tests/settings/controller/userscontrollertest.php b/tests/settings/controller/userscontrollertest.php
index 53a42de62ab..b813da038a3 100644
--- a/tests/settings/controller/userscontrollertest.php
+++ b/tests/settings/controller/userscontrollertest.php
@@ -162,7 +162,7 @@ class UsersControllerTest extends \Test\TestCase {
'subadmin' => array(),
'quota' => 1024,
'storageLocation' => '/home/foo',
- 'lastLogin' => 500,
+ 'lastLogin' => 500000,
'backend' => 'OC_User_Database',
'email' => 'foo@bar.com',
'isRestoreDisabled' => false,
@@ -174,7 +174,7 @@ class UsersControllerTest extends \Test\TestCase {
'subadmin' => array(),
'quota' => 404,
'storageLocation' => '/home/admin',
- 'lastLogin' => 12,
+ 'lastLogin' => 12000,
'backend' => 'OC_User_Dummy',
'email' => 'admin@bar.com',
'isRestoreDisabled' => false,
@@ -186,7 +186,7 @@ class UsersControllerTest extends \Test\TestCase {
'subadmin' => array(),
'quota' => 2323,
'storageLocation' => '/home/bar',
- 'lastLogin' => 3999,
+ 'lastLogin' => 3999000,
'backend' => 'OC_User_Dummy',
'email' => 'bar@dummy.com',
'isRestoreDisabled' => false,
@@ -330,7 +330,7 @@ class UsersControllerTest extends \Test\TestCase {
'subadmin' => [],
'quota' => 1024,
'storageLocation' => '/home/foo',
- 'lastLogin' => 500,
+ 'lastLogin' => 500000,
'backend' => 'OC_User_Database',
'email' => 'foo@bar.com',
'isRestoreDisabled' => false,
@@ -342,7 +342,7 @@ class UsersControllerTest extends \Test\TestCase {
'subadmin' => [],
'quota' => 404,
'storageLocation' => '/home/admin',
- 'lastLogin' => 12,
+ 'lastLogin' => 12000,
'backend' => 'OC_User_Dummy',
'email' => 'admin@bar.com',
'isRestoreDisabled' => false,
@@ -354,7 +354,7 @@ class UsersControllerTest extends \Test\TestCase {
'subadmin' => [],
'quota' => 2323,
'storageLocation' => '/home/bar',
- 'lastLogin' => 3999,
+ 'lastLogin' => 3999000,
'backend' => 'OC_User_Dummy',
'email' => 'bar@dummy.com',
'isRestoreDisabled' => false,
@@ -461,7 +461,7 @@ class UsersControllerTest extends \Test\TestCase {
'subadmin' => array(),
'quota' => 1024,
'storageLocation' => '/home/foo',
- 'lastLogin' => 500,
+ 'lastLogin' => 500000,
'backend' => 'OC_User_Database',
'email' => 'foo@bar.com',
'isRestoreDisabled' => false,
@@ -473,7 +473,7 @@ class UsersControllerTest extends \Test\TestCase {
'subadmin' => array(),
'quota' => 404,
'storageLocation' => '/home/admin',
- 'lastLogin' => 12,
+ 'lastLogin' => 12000,
'backend' => 'OC_User_Dummy',
'email' => 'admin@bar.com',
'isRestoreDisabled' => false,
@@ -485,7 +485,7 @@ class UsersControllerTest extends \Test\TestCase {
'subadmin' => array(),
'quota' => 2323,
'storageLocation' => '/home/bar',
- 'lastLogin' => 3999,
+ 'lastLogin' => 3999000,
'backend' => 'OC_User_Dummy',
'email' => 'bar@dummy.com',
'isRestoreDisabled' => false,
@@ -545,7 +545,7 @@ class UsersControllerTest extends \Test\TestCase {
'subadmin' => array(),
'quota' => null,
'storageLocation' => '/home/foo',
- 'lastLogin' => 500,
+ 'lastLogin' => 500000,
'backend' => 'OC_User_Database',
'email' => null,
'isRestoreDisabled' => false,
@@ -1239,7 +1239,7 @@ class UsersControllerTest extends \Test\TestCase {
'subadmin' => array(),
'quota' => null,
'storageLocation' => $home,
- 'lastLogin' => $lastLogin,
+ 'lastLogin' => $lastLogin * 1000,
'backend' => $backend,
'email' => null,
'isRestoreDisabled' => false,