]> git.mxchange.org Git - friendica.git/commitdiff
Update the last activity in OAuth
authorMichael <heluecht@pirati.ca>
Thu, 1 Dec 2022 06:02:51 +0000 (06:02 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 1 Dec 2022 06:02:51 +0000 (06:02 +0000)
src/Security/Authentication.php
src/Security/OAuth.php

index 47407b13384ee92dc2e1d19a99f9d216b9381d8c..f550501ede89b915cdde05a97d8e407d1fd08111 100644 (file)
@@ -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']);
index 54b412735a70247a5017b53507f4b928a919a8ff..27a3dfa11b2328f83c1cc60f6b86dfe98bafd6e0 100644 (file)
@@ -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'])) {