diff options
author | Joas Schilling <coding@schilljs.com> | 2025-04-23 10:16:06 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2025-04-23 12:38:18 +0200 |
commit | 9ed33cf6aa07089b99639404c309cf4a4972afdc (patch) | |
tree | f8944cb14083e21524569579a5774bbac2d7eda4 /lib/private | |
parent | 14868ac0eea9e7043b136c7b002c92072b0d0c37 (diff) | |
download | nextcloud-server-feat/noid/profile-data-api.tar.gz nextcloud-server-feat/noid/profile-data-api.zip |
feat(profile): Add an API to get the profile field datafeat/noid/profile-data-api
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Profile/ProfileManager.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/Profile/ProfileManager.php b/lib/private/Profile/ProfileManager.php index 9d3d94fab21..13860286356 100644 --- a/lib/private/Profile/ProfileManager.php +++ b/lib/private/Profile/ProfileManager.php @@ -12,6 +12,7 @@ namespace OC\Profile; use OC\AppFramework\Bootstrap\Coordinator; use OC\Core\Db\ProfileConfig; use OC\Core\Db\ProfileConfigMapper; +use OC\Core\ResponseDefinitions; use OC\KnownUser\KnownUserService; use OC\Profile\Actions\EmailAction; use OC\Profile\Actions\FediverseAction; @@ -33,6 +34,9 @@ use Psr\Log\LoggerInterface; use function array_flip; use function usort; +/** + * @psalm-import-type CoreProfileFields from ResponseDefinitions + */ class ProfileManager implements IProfileManager { /** @var ILinkAction[] */ private array $actions = []; @@ -223,7 +227,7 @@ class ProfileManager implements IProfileManager { /** * Return the profile parameters of the target user that are visible to the visiting user * in an associative array - * @return array{userId: string, address?: string|null, biography?: string|null, displayname?: string|null, headline?: string|null, isUserAvatarVisible?: bool, organisation?: string|null, pronouns?: string|null, role?: string|null, actions: list<array{id: string, icon: string, title: string, target: ?string}>} + * @psalm-return CoreProfileFields */ public function getProfileFields(IUser $targetUser, ?IUser $visitingUser): array { $account = $this->accountManager->getAccount($targetUser); |