Merge pull request #13973 from annando/parent-activity

Change the last activity for delegation parents and siblings as well
This commit is contained in:
Hypolite Petovan 2024-03-07 09:02:46 -05:00 committed by GitHub
commit 1b00b91767
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -846,6 +846,11 @@ class User
self::update($fields, $user['uid']); self::update($fields, $user['uid']);
// Set the last activity for all identities of the user // Set the last activity for all identities of the user
DBA::update('user', $fields, ['parent-uid' => $user['uid'], 'verified' => true, 'blocked' => false, 'account_removed' => false, 'account_expired' => false]); DBA::update('user', $fields, ['parent-uid' => $user['uid'], 'verified' => true, 'blocked' => false, 'account_removed' => false, 'account_expired' => false]);
if (!empty($user['parent-uid'])) {
self::update($fields, $user['parent-uid']);
DBA::update('user', $fields, ['parent-uid' => $user['parent-uid'], 'verified' => true, 'blocked' => false, 'account_removed' => false, 'account_expired' => false]);
}
} }
/** /**

View File

@ -104,7 +104,7 @@ class OAuth
} }
Logger::debug('Token found', $token); Logger::debug('Token found', $token);
$user = User::getById($token['uid'], ['uid', 'last-activity', 'login_date']); $user = User::getById($token['uid'], ['uid', 'parent-uid', 'last-activity', 'login_date']);
if (!empty($user)) { if (!empty($user)) {
User::updateLastActivity($user, false); User::updateLastActivity($user, false);
} }