Commit 7f624188 authored by Lukas Reschke's avatar Lukas Reschke
Browse files

Merge pull request #14261 from owncloud/fix-last-login-master

Return milliseconds instead of seconds for lastLogin - refs #14005
parents 1a4b9b0c 4910f3e2
...@@ -154,7 +154,7 @@ class UsersController extends Controller { ...@@ -154,7 +154,7 @@ class UsersController extends Controller {
'subadmin' => \OC_SubAdmin::getSubAdminsGroups($user->getUID()), 'subadmin' => \OC_SubAdmin::getSubAdminsGroups($user->getUID()),
'quota' => $this->config->getUserValue($user->getUID(), 'files', 'quota', 'default'), 'quota' => $this->config->getUserValue($user->getUID(), 'files', 'quota', 'default'),
'storageLocation' => $user->getHome(), 'storageLocation' => $user->getHome(),
'lastLogin' => $user->getLastLogin(), 'lastLogin' => $user->getLastLogin() * 1000,
'backend' => $user->getBackendClassName(), 'backend' => $user->getBackendClassName(),
'email' => $this->config->getUserValue($user->getUID(), 'settings', 'email', ''), 'email' => $this->config->getUserValue($user->getUID(), 'settings', 'email', ''),
'isRestoreDisabled' => !$restorePossible, 'isRestoreDisabled' => !$restorePossible,
......
...@@ -162,7 +162,7 @@ class UsersControllerTest extends \Test\TestCase { ...@@ -162,7 +162,7 @@ class UsersControllerTest extends \Test\TestCase {
'subadmin' => array(), 'subadmin' => array(),
'quota' => 1024, 'quota' => 1024,
'storageLocation' => '/home/foo', 'storageLocation' => '/home/foo',
'lastLogin' => 500, 'lastLogin' => 500000,
'backend' => 'OC_User_Database', 'backend' => 'OC_User_Database',
'email' => 'foo@bar.com', 'email' => 'foo@bar.com',
'isRestoreDisabled' => false, 'isRestoreDisabled' => false,
...@@ -174,7 +174,7 @@ class UsersControllerTest extends \Test\TestCase { ...@@ -174,7 +174,7 @@ class UsersControllerTest extends \Test\TestCase {
'subadmin' => array(), 'subadmin' => array(),
'quota' => 404, 'quota' => 404,
'storageLocation' => '/home/admin', 'storageLocation' => '/home/admin',
'lastLogin' => 12, 'lastLogin' => 12000,
'backend' => 'OC_User_Dummy', 'backend' => 'OC_User_Dummy',
'email' => 'admin@bar.com', 'email' => 'admin@bar.com',
'isRestoreDisabled' => false, 'isRestoreDisabled' => false,
...@@ -186,7 +186,7 @@ class UsersControllerTest extends \Test\TestCase { ...@@ -186,7 +186,7 @@ class UsersControllerTest extends \Test\TestCase {
'subadmin' => array(), 'subadmin' => array(),
'quota' => 2323, 'quota' => 2323,
'storageLocation' => '/home/bar', 'storageLocation' => '/home/bar',
'lastLogin' => 3999, 'lastLogin' => 3999000,
'backend' => 'OC_User_Dummy', 'backend' => 'OC_User_Dummy',
'email' => 'bar@dummy.com', 'email' => 'bar@dummy.com',
'isRestoreDisabled' => false, 'isRestoreDisabled' => false,
...@@ -330,7 +330,7 @@ class UsersControllerTest extends \Test\TestCase { ...@@ -330,7 +330,7 @@ class UsersControllerTest extends \Test\TestCase {
'subadmin' => [], 'subadmin' => [],
'quota' => 1024, 'quota' => 1024,
'storageLocation' => '/home/foo', 'storageLocation' => '/home/foo',
'lastLogin' => 500, 'lastLogin' => 500000,
'backend' => 'OC_User_Database', 'backend' => 'OC_User_Database',
'email' => 'foo@bar.com', 'email' => 'foo@bar.com',
'isRestoreDisabled' => false, 'isRestoreDisabled' => false,
...@@ -342,7 +342,7 @@ class UsersControllerTest extends \Test\TestCase { ...@@ -342,7 +342,7 @@ class UsersControllerTest extends \Test\TestCase {
'subadmin' => [], 'subadmin' => [],
'quota' => 404, 'quota' => 404,
'storageLocation' => '/home/admin', 'storageLocation' => '/home/admin',
'lastLogin' => 12, 'lastLogin' => 12000,
'backend' => 'OC_User_Dummy', 'backend' => 'OC_User_Dummy',
'email' => 'admin@bar.com', 'email' => 'admin@bar.com',
'isRestoreDisabled' => false, 'isRestoreDisabled' => false,
...@@ -354,7 +354,7 @@ class UsersControllerTest extends \Test\TestCase { ...@@ -354,7 +354,7 @@ class UsersControllerTest extends \Test\TestCase {
'subadmin' => [], 'subadmin' => [],
'quota' => 2323, 'quota' => 2323,
'storageLocation' => '/home/bar', 'storageLocation' => '/home/bar',
'lastLogin' => 3999, 'lastLogin' => 3999000,
'backend' => 'OC_User_Dummy', 'backend' => 'OC_User_Dummy',
'email' => 'bar@dummy.com', 'email' => 'bar@dummy.com',
'isRestoreDisabled' => false, 'isRestoreDisabled' => false,
...@@ -461,7 +461,7 @@ class UsersControllerTest extends \Test\TestCase { ...@@ -461,7 +461,7 @@ class UsersControllerTest extends \Test\TestCase {
'subadmin' => array(), 'subadmin' => array(),
'quota' => 1024, 'quota' => 1024,
'storageLocation' => '/home/foo', 'storageLocation' => '/home/foo',
'lastLogin' => 500, 'lastLogin' => 500000,
'backend' => 'OC_User_Database', 'backend' => 'OC_User_Database',
'email' => 'foo@bar.com', 'email' => 'foo@bar.com',
'isRestoreDisabled' => false, 'isRestoreDisabled' => false,
...@@ -473,7 +473,7 @@ class UsersControllerTest extends \Test\TestCase { ...@@ -473,7 +473,7 @@ class UsersControllerTest extends \Test\TestCase {
'subadmin' => array(), 'subadmin' => array(),
'quota' => 404, 'quota' => 404,
'storageLocation' => '/home/admin', 'storageLocation' => '/home/admin',
'lastLogin' => 12, 'lastLogin' => 12000,
'backend' => 'OC_User_Dummy', 'backend' => 'OC_User_Dummy',
'email' => 'admin@bar.com', 'email' => 'admin@bar.com',
'isRestoreDisabled' => false, 'isRestoreDisabled' => false,
...@@ -485,7 +485,7 @@ class UsersControllerTest extends \Test\TestCase { ...@@ -485,7 +485,7 @@ class UsersControllerTest extends \Test\TestCase {
'subadmin' => array(), 'subadmin' => array(),
'quota' => 2323, 'quota' => 2323,
'storageLocation' => '/home/bar', 'storageLocation' => '/home/bar',
'lastLogin' => 3999, 'lastLogin' => 3999000,
'backend' => 'OC_User_Dummy', 'backend' => 'OC_User_Dummy',
'email' => 'bar@dummy.com', 'email' => 'bar@dummy.com',
'isRestoreDisabled' => false, 'isRestoreDisabled' => false,
...@@ -545,7 +545,7 @@ class UsersControllerTest extends \Test\TestCase { ...@@ -545,7 +545,7 @@ class UsersControllerTest extends \Test\TestCase {
'subadmin' => array(), 'subadmin' => array(),
'quota' => null, 'quota' => null,
'storageLocation' => '/home/foo', 'storageLocation' => '/home/foo',
'lastLogin' => 500, 'lastLogin' => 500000,
'backend' => 'OC_User_Database', 'backend' => 'OC_User_Database',
'email' => null, 'email' => null,
'isRestoreDisabled' => false, 'isRestoreDisabled' => false,
...@@ -1239,7 +1239,7 @@ class UsersControllerTest extends \Test\TestCase { ...@@ -1239,7 +1239,7 @@ class UsersControllerTest extends \Test\TestCase {
'subadmin' => array(), 'subadmin' => array(),
'quota' => null, 'quota' => null,
'storageLocation' => $home, 'storageLocation' => $home,
'lastLogin' => $lastLogin, 'lastLogin' => $lastLogin * 1000,
'backend' => $backend, 'backend' => $backend,
'email' => null, 'email' => null,
'isRestoreDisabled' => false, 'isRestoreDisabled' => false,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment