diff options
author | Jake Nabasny <jake@nabasny.com> | 2023-11-28 11:01:52 -0500 |
---|---|---|
committer | Richard Steinmetz <richard@steinmetz.cloud> | 2024-05-30 12:01:13 +0200 |
commit | f863290572ff91d9a8a8d6cb2ad819964c3a1426 (patch) | |
tree | 389883fb9a18bdb2dbcd466bd0f46fe9ff7b82b8 /apps/settings/lib/Controller | |
parent | 57a7f09a722c384cb3940c19ed2d00d5b9ec925c (diff) | |
download | nextcloud-server-f863290572ff91d9a8a8d6cb2ad819964c3a1426.tar.gz nextcloud-server-f863290572ff91d9a8a8d6cb2ad819964c3a1426.zip |
feat(ldap): sync additional properties to profile and SAB
Synced from LDAP to profile:
- Date of birth
Synced from LDAP to SAB (via the profile):
- Biography
- Date of birth
Original code by Jake Nabasny (GitHub: @slapcat)
Co-authored-by: Jake Nabasny <jake@nabasny.com>
Co-authored-by: Richard Steinmetz <richard@steinmetz.cloud>
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
Diffstat (limited to 'apps/settings/lib/Controller')
-rw-r--r-- | apps/settings/lib/Controller/UsersController.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/settings/lib/Controller/UsersController.php b/apps/settings/lib/Controller/UsersController.php index 2cfe9d515bf..6188a00195d 100644 --- a/apps/settings/lib/Controller/UsersController.php +++ b/apps/settings/lib/Controller/UsersController.php @@ -326,6 +326,8 @@ class UsersController extends Controller { * @param string|null $twitterScope * @param string|null $fediverse * @param string|null $fediverseScope + * @param string|null $birthdate + * @param string|null $birthdateScope * * @return DataResponse */ @@ -343,7 +345,9 @@ class UsersController extends Controller { ?string $twitter = null, ?string $twitterScope = null, ?string $fediverse = null, - ?string $fediverseScope = null + ?string $fediverseScope = null, + ?string $birthdate = null, + ?string $birthdateScope = null, ) { $user = $this->userSession->getUser(); if (!$user instanceof IUser) { @@ -383,6 +387,7 @@ class UsersController extends Controller { IAccountManager::PROPERTY_PHONE => ['value' => $phone, 'scope' => $phoneScope], IAccountManager::PROPERTY_TWITTER => ['value' => $twitter, 'scope' => $twitterScope], IAccountManager::PROPERTY_FEDIVERSE => ['value' => $fediverse, 'scope' => $fediverseScope], + IAccountManager::PROPERTY_BIRTHDATE => ['value' => $birthdate, 'scope' => $birthdateScope], ]; $allowUserToChangeDisplayName = $this->config->getSystemValueBool('allow_user_to_change_display_name', true); foreach ($updatable as $property => $data) { @@ -424,6 +429,8 @@ class UsersController extends Controller { 'twitterScope' => $userAccount->getProperty(IAccountManager::PROPERTY_TWITTER)->getScope(), 'fediverse' => $userAccount->getProperty(IAccountManager::PROPERTY_FEDIVERSE)->getValue(), 'fediverseScope' => $userAccount->getProperty(IAccountManager::PROPERTY_FEDIVERSE)->getScope(), + 'birthdate' => $userAccount->getProperty(IAccountManager::PROPERTY_BIRTHDATE)->getValue(), + 'birthdateScope' => $userAccount->getProperty(IAccountManager::PROPERTY_BIRTHDATE)->getScope(), 'message' => $this->l10n->t('Settings saved'), ], ], |