From 8e0196fec39b52b54a715ff0f32e80040313d511 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 1 Dec 2022 06:02:51 +0000 Subject: [PATCH] Update the last activity in OAuth --- src/Security/Authentication.php | 4 +--- src/Security/OAuth.php | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Security/Authentication.php b/src/Security/Authentication.php index 47407b1338..f550501ede 100644 --- a/src/Security/Authentication.php +++ b/src/Security/Authentication.php @@ -353,14 +353,12 @@ class Authentication $this->setXAccMgmtStatusHeader($user_record); if ($login_initial || $login_refresh) { - $this->dba->update('user', ['login_date' => DateTimeFormat::utcNow()], ['uid' => $user_record['uid']]); + $this->dba->update('user', ['last-activity' => DateTimeFormat::utcNow('Y-m-d'), 'login_date' => DateTimeFormat::utcNow()], ['uid' => $user_record['uid']]); // Set the login date for all identities of the user $this->dba->update('user', ['login_date' => DateTimeFormat::utcNow()], ['parent-uid' => $user_record['uid'], 'account_removed' => false]); -// User::updateLastActivity($user_record['uid']); - // Regularly update suggestions if (Contact\Relation::areSuggestionsOutdated($user_record['uid'])) { Worker::add(Worker::PRIORITY_MEDIUM, 'UpdateSuggestions', $user_record['uid']); diff --git a/src/Security/OAuth.php b/src/Security/OAuth.php index 54b412735a..27a3dfa11b 100644 --- a/src/Security/OAuth.php +++ b/src/Security/OAuth.php @@ -104,7 +104,7 @@ class OAuth } Logger::debug('Token found', $token); -// User::updateLastActivity($token['uid']); + User::updateLastActivity($token['uid']); // Regularly update suggestions if (Contact\Relation::areSuggestionsOutdated($token['uid'])) { -- 2.39.5