From b15a5a7ca0ef0d1382db44b570111220569ae3c8 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Mon, 2 Jun 2014 12:52:44 +0200 Subject: [PATCH] undo lastLogin changes in base and user/user as this has now been properly done in #8681 --- lib/base.php | 4 ---- lib/private/user/user.php | 24 ------------------------ 2 files changed, 28 deletions(-) diff --git a/lib/base.php b/lib/base.php index 5866c949b6e..5f2131f388f 100644 --- a/lib/base.php +++ b/lib/base.php @@ -882,7 +882,6 @@ class OC { // if return is true we are logged in -> redirect to the default page if ($return === true) { - OC_User::getManager()->get(OC_User::getUser())->updateLastLogin(); $_REQUEST['redirect_url'] = \OC_Request::requestUri(); OC_Util::redirectToDefaultPage(); exit; @@ -916,7 +915,6 @@ class OC { $granted = OC_User::loginWithCookie( $_COOKIE['oc_username'], $_COOKIE['oc_token']); if($granted === true) { - OC_User::getManager()->get(OC_User::getUser())->updateLastLogin(); OC_Util::redirectToDefaultPage(); // doesn't return } @@ -954,7 +952,6 @@ class OC { } $userid = OC_User::getUser(); - OC_User::getManager()->get($userid)->updateLastLogin(); self::cleanupLoginTokens($userid); if (!empty($_POST["remember_login"])) { if (defined("DEBUG") && DEBUG) { @@ -986,7 +983,6 @@ class OC { if (OC_User::login($_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"])) { //OC_Log::write('core',"Logged in with HTTP Authentication", OC_Log::DEBUG); - OC_User::getManager()->get(OC_User::getUser())->updateLastLogin(); OC_User::unsetMagicInCookie(); $_SERVER['HTTP_REQUESTTOKEN'] = OC_Util::callRegister(); } diff --git a/lib/private/user/user.php b/lib/private/user/user.php index ddef3b7adf1..8eaefe8de13 100644 --- a/lib/private/user/user.php +++ b/lib/private/user/user.php @@ -52,11 +52,6 @@ class User { */ private $config; - /** - * @var int $lastLogin - */ - private $lastLogin; - /** * @param string $uid * @param \OC_User_Interface $backend @@ -74,7 +69,6 @@ class User { } else { $this->enabled = true; } - $this->lastLogin = \OC_Preferences::getValue($uid, 'login', 'lastLogin', 0); } /** @@ -248,22 +242,4 @@ class User { $this->config->setUserValue($this->uid, 'core', 'enabled', $enabled); } } - - /** - * returns the timestamp of the user's last login or 0 if the user did never - * login - * - * @return int - */ - public function getLastLogin() { - return $this->lastLogin; - } - - /** - * @brief updates the timestamp of the most recent login of this user - */ - public function updateLastLogin() { - $this->lastLogin = time(); - \OC_Preferences::setValue($this->uid, 'login', 'lastLogin', $this->lastLogin); - } } -- 2.39.5