diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2024-09-17 21:41:45 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2024-09-17 22:20:36 +0200 |
commit | 26abc86eca7cf6ae95f20e1dc180774d11892aab (patch) | |
tree | c646582f842066e92b8cce3ddc593e3bef0a24b7 /apps/settings/lib | |
parent | dc71cb7c3a94eeea69f647f248f3bcbfcecdbe2b (diff) | |
download | nextcloud-server-26abc86eca7cf6ae95f20e1dc180774d11892aab.tar.gz nextcloud-server-26abc86eca7cf6ae95f20e1dc180774d11892aab.zip |
feat: add profile pronouns
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/settings/lib')
-rw-r--r-- | apps/settings/lib/Controller/UsersController.php | 5 | ||||
-rw-r--r-- | apps/settings/lib/Settings/Personal/PersonalInfo.php | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/apps/settings/lib/Controller/UsersController.php b/apps/settings/lib/Controller/UsersController.php index 4ee359b6fe9..eb401f85536 100644 --- a/apps/settings/lib/Controller/UsersController.php +++ b/apps/settings/lib/Controller/UsersController.php @@ -335,6 +335,8 @@ class UsersController extends Controller { ?string $fediverseScope = null, ?string $birthdate = null, ?string $birthdateScope = null, + ?string $pronouns = null, + ?string $pronounsScope = null ) { $user = $this->userSession->getUser(); if (!$user instanceof IUser) { @@ -375,6 +377,7 @@ class UsersController extends Controller { IAccountManager::PROPERTY_TWITTER => ['value' => $twitter, 'scope' => $twitterScope], IAccountManager::PROPERTY_FEDIVERSE => ['value' => $fediverse, 'scope' => $fediverseScope], IAccountManager::PROPERTY_BIRTHDATE => ['value' => $birthdate, 'scope' => $birthdateScope], + IAccountManager::PROPERTY_PRONOUNS => ['value' => $pronouns, 'scope' => $pronounsScope], ]; $allowUserToChangeDisplayName = $this->config->getSystemValueBool('allow_user_to_change_display_name', true); foreach ($updatable as $property => $data) { @@ -418,6 +421,8 @@ class UsersController extends Controller { 'fediverseScope' => $userAccount->getProperty(IAccountManager::PROPERTY_FEDIVERSE)->getScope(), 'birthdate' => $userAccount->getProperty(IAccountManager::PROPERTY_BIRTHDATE)->getValue(), 'birthdateScope' => $userAccount->getProperty(IAccountManager::PROPERTY_BIRTHDATE)->getScope(), + 'pronouns' => $userAccount->getProperty(IAccountManager::PROPERTY_PRONOUNS)->getValue(), + 'pronounsScope' => $userAccount->getProperty(IAccountManager::PROPERTY_PRONOUNS)->getScope(), 'message' => $this->l10n->t('Settings saved'), ], ], diff --git a/apps/settings/lib/Settings/Personal/PersonalInfo.php b/apps/settings/lib/Settings/Personal/PersonalInfo.php index bfac996de2f..232fea8bd73 100644 --- a/apps/settings/lib/Settings/Personal/PersonalInfo.php +++ b/apps/settings/lib/Settings/Personal/PersonalInfo.php @@ -143,6 +143,7 @@ class PersonalInfo implements ISettings { 'biography' => $this->getProperty($account, IAccountManager::PROPERTY_BIOGRAPHY), 'birthdate' => $this->getProperty($account, IAccountManager::PROPERTY_BIRTHDATE), 'firstDayOfWeek' => $this->config->getUserValue($uid, 'core', AUserData::USER_FIELD_FIRST_DAY_OF_WEEK), + 'pronouns' => $this->getProperty($account, IAccountManager::PROPERTY_PRONOUNS), ]; $accountParameters = [ |