]> git.mxchange.org Git - friendica.git/commitdiff
Change the last activity for delegation parents and siblings as well
authorMichael <heluecht@pirati.ca>
Thu, 7 Mar 2024 06:12:36 +0000 (06:12 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 7 Mar 2024 06:12:36 +0000 (06:12 +0000)
src/Model/User.php
src/Security/OAuth.php

index 59ac7b46b5888248da3d5769e2d7a8039e48cb86..5b06f5e77a6367f678620c0ccc89ad077701f7a9 100644 (file)
@@ -846,6 +846,11 @@ class User
                self::update($fields, $user['uid']);
                // 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]);
+
+               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]);
+               }
        }
 
        /**
index 167c55487f08f95b97495ca8a829b5359b02b835..88dbdf4c2d47687cfb112ee10f6d05ec8494df95 100644 (file)
@@ -104,7 +104,7 @@ class OAuth
                }
                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)) {
                        User::updateLastActivity($user, false);
                }