diff options
author | Joas Schilling <coding@schilljs.com> | 2022-08-18 23:52:34 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-08-19 10:48:32 +0200 |
commit | 7e1177819023a185480b5251e3a22dc429948518 (patch) | |
tree | 66288b17692cfcdde3e3273051e00224b4167b1f /apps/files_sharing | |
parent | cab0f1327e28104ef61e8767f963d20cf38544af (diff) | |
download | nextcloud-server-7e1177819023a185480b5251e3a22dc429948518.tar.gz nextcloud-server-7e1177819023a185480b5251e3a22dc429948518.zip |
Use user name cache in activity providers
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/lib/Activity/Providers/Base.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/files_sharing/lib/Activity/Providers/Base.php b/apps/files_sharing/lib/Activity/Providers/Base.php index cbd16c134cc..ca5b9b55b62 100644 --- a/apps/files_sharing/lib/Activity/Providers/Base.php +++ b/apps/files_sharing/lib/Activity/Providers/Base.php @@ -177,12 +177,12 @@ abstract class Base implements IProvider { */ protected function getUser($uid) { // First try local user - $user = $this->userManager->get($uid); - if ($user instanceof IUser) { + $displayName = $this->userManager->getDisplayName($uid); + if ($displayName !== null) { return [ 'type' => 'user', - 'id' => $user->getUID(), - 'name' => $user->getDisplayName(), + 'id' => $uid, + 'name' => $displayName, ]; } |