summaryrefslogtreecommitdiffstats
path: root/lib/private/User/User.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/User/User.php')
-rw-r--r--lib/private/User/User.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/User/User.php b/lib/private/User/User.php
index 68787ce60f8..3cc6dc3b7ed 100644
--- a/lib/private/User/User.php
+++ b/lib/private/User/User.php
@@ -180,9 +180,12 @@ class User implements IUser {
* updates the timestamp of the most recent login of this user
*/
public function updateLastLoginTimestamp() {
+ $firstTimeLogin = ($this->lastLogin === 0);
$this->lastLogin = time();
- \OC::$server->getConfig()->setUserValue(
+ $this->config->setUserValue(
$this->uid, 'login', 'lastLogin', $this->lastLogin);
+
+ return $firstTimeLogin;
}
/**