aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Accounts
Commit message (Collapse)AuthorAgeFilesLines
* feat(ldap): sync additional properties to profile and SABJake Nabasny2024-05-301-0/+7
| | | | | | | | | | | | | | | 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>
* chore: Add SPDX headerAndy Scherzinger2024-05-246-135/+13
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* refactor(provisioning_api): Add types for user details scopesprovokateurin2024-05-111-0/+3
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* fix: Apply new coding standard to all filesCôme Chilliet2024-04-021-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-231-2/+2
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* fix(phonenumber): Use the newly introduced API to limit 3rdparty lib usageJoas Schilling2023-09-251-10/+5
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix: always use display name from correct backendMax2023-08-151-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Overwrite the display name after the account is initialized when using an instacne of IGetDisplayNameBackend. Before when using a variation of user_oidc and registering a Backend.php implementing IGetDisplayNameBackend the personal setting page shows 'uid'. The UserManager/AccountManager seems not to use consistently the correct backend. The correct backend is used in this sequence: server/lib/private/TemplateLayout.php $userDisplayName = \OC_User::getDisplayName(); $this->assign(user_displayname, $userDisplayName); In the settings page, it definitely not calls the registered backend, but seems to fall back to default Backend and shows (usually) uid or a value from the standard account property table. Signed-off-by: Max <max@nextcloud.com>
* feat!: Migrate AccountManager event to typed eventJoas Schilling2023-07-281-7/+7
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Renames the property to improve the code readbility/clarity.Faraz Samapoor2023-07-051-2/+2
| | | | | | | | Based on: https://github.com/nextcloud/server/pull/38978#pullrequestreview-1514202944 Co-authored-by: Arthur Schiwon <blizzz@arthur-schiwon.de> Signed-off-by: Faraz Samapoor <fsa@adlas.at>
* Fixes testcase errors.Faraz Samapoor2023-07-021-8/+9
| | | | Signed-off-by: Faraz Samapoor <fsa@adlas.at>
* Fixes Psalm error.Faraz Samapoor2023-07-011-4/+1
| | | | Signed-off-by: Faraz Samapoor <fsa@adlas.at>
* Refactors lib/private/Accounts.Faraz Samapoor2023-07-015-138/+46
| | | | | | Mainly using PHP8's constructor property promotion. Signed-off-by: Faraz Samapoor <fsa@adlas.at>
* fix(caching): Avoid checking existence before fetchingChristoph Wurst2023-06-121-2/+3
| | | | | | | | The cache might expire between checking for key existence and fetching the value. In this rare case the code continues with a null value when it doesn't expect one. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #38261 from fsamapoor/replace_strpos_calls_in_lib_privateRobin Appelman2023-06-012-2/+2
|\ | | | | Refactors "strpos" calls in lib/private to improve code readability.
| * Refactors "strpos" calls in lib/private to improve code readability.Faraz Samapoor2023-05-152-2/+2
| | | | | | | | Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
* | fix(CI): Satisfy psalm by removing a now obsolete type checkJoas Schilling2023-05-311-2/+1
|/ | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* composer run cs:fixCôme Chilliet2023-01-203-3/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Rename mastodon to fediverseCarl Schwan2022-11-221-4/+4
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Add mastodon personal info fieldCarl Schwan2022-11-211-0/+9
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Cleanup tags and Share componentCarl Schwan2022-09-291-0/+3
| | | | | | | | | - Port to LoggerInterface - Use IDBConnection and IQueryBuilder instead of raw SQL and OC_DB - Use IEventListener instead of hooks - Remove the now unused OC_DB and OC_DB_StatementWrapper legacy utils Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Move CappedMemoryCache to OCPCarl Schwan2022-07-141-1/+1
| | | | | | | | This is an helpful helper that should be used in more place than just server and this is already the case with groupfodlers, deck, user_oidc and more using it, so let's make it public Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Fix exception handling when profile data is too longJoas Schilling2022-06-091-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Allow to tweak default scopes for accountsThomas Citharel2022-05-161-25/+37
| | | | | | Close #6582 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* Minor optimizations for saving user personal informationCarl Schwan2022-05-121-9/+9
| | | | | | | | | | | | | | | | * Remove double hook: the OC_User::changeUser triggers an OC\AccountManager::userUpdated and the app is already listening to this signal in its Application definition * Make createCard not check if an card exists if we already checked previously. We also don't try to get the card if the user is disabled as we don't use the card in this case We this change we go from 100 DB requests to 80 DB requests when saving an user email address. Signed-off-by: Carl Schwan <carl@carlschwan.eu> (cherry picked from commit c6fd482edf33214a9ad4787e4cac278f871fa7c8)
* Cache account informationCarl Schwan2022-04-051-1/+10
| | | | | | | | | | | | | Currently, each field of the profile settings is fetching the account information. This patch makes it so that only the first time do a DB call and all the later ones are cached. Reduce by 5 queries when loading the profile setting page and I suppose other pages are affected since loading a page generates always fetch at least once the account information to see if the profile feature is enabled for the user. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Add profile default setting for adminChristopher Ng2022-03-181-1/+4
| | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
* Add method to set all account properties from jsonChristopher Ng2022-03-171-0/+22
| | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
* Discard duplicate collection name from account serializationChristopher Ng2022-03-171-2/+9
| | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
* Merge pull request #30508 from nextcloud/fix/psaml-binCarl Schwan2022-01-131-1/+1
|\ | | | | Fix psalm not running
| * Check style updateCarl Schwan2022-01-131-1/+1
| | | | | | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* | Fix undefined/unset scope in account propertiesJoas Schilling2022-01-111-0/+1
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Fix email verificationChristopher Ng2022-01-061-1/+4
|/ | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
* Obey col length of 255 to insert and search in accounts_dataArthur Schiwon2021-11-261-1/+8
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Fix ArrayAccess and JsonSerializable return typesCôme Chilliet2021-11-233-3/+4
| | | | | | First round of modifications for PHP 8.1 Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix populating account array with missing default valuesArthur Schiwon2021-10-221-6/+7
| | | | | | | | - both $userData and $defaultUserData have numeric indices - each element contains at least the name and other fields - appending the missing data array is sufficient Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Add new account propertiesChristopher Ng2021-10-192-13/+53
| | | | | | | | | | | | | | - New properties - Organisation - Role - Headline - Biography - Profile Enabled property - Fix errors with building default account properties - Fix L10N factory method `getLanguage` not public error - Update tests Signed-off-by: Christopher Ng <chrng8@gmail.com>
* implement verification for additional mailsArthur Schiwon2021-09-093-11/+150
| | | | | | | | | | | | - mails added by (sub)admins are automatically verified - provisioning_api controller as verification endpoint - IAccountProperty gets a locallyVerified property - IPropertyCollection gets a method to fetch an IAccountProperty by value - an remove equivalent was already present - AccountManager always initiates mail verification on update if necessary - add core success template for arbitrary title and message Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* cleanupArthur Schiwon2021-06-301-7/+3
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* adjust internal data handling logic to fix store and loadArthur Schiwon2021-06-302-132/+147
| | | | | | - format as stored previously in oc_accounts table is kept Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* adjust email verification checkerArthur Schiwon2021-06-301-16/+18
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* fix code styleArthur Schiwon2021-06-302-2/+2
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* adjust verification state updater methodArthur Schiwon2021-06-301-70/+33
| | | | | | - also fixes scope of internal methods Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* make AccountManager actually write multi value propertiesArthur Schiwon2021-06-301-98/+145
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* accounts event handler to use eventdispatcher, DI and Accounts APIArthur Schiwon2021-06-301-39/+28
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* prov api to be able to edit multivalue propertiesArthur Schiwon2021-06-301-0/+13
| | | | | | | - adding as usual - deleting and scope setting via additional endpoint Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* prov api reports additional emails on getUserArthur Schiwon2021-06-301-2/+26
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Merge pull request #27189 from ↵blizzz2021-06-084-57/+273
|\ | | | | | | | | nextcloud/feat/26866/account-collection-properties Extend Accounts with multivalue properties (PropertyCollection)
| * psalm happinessArthur Schiwon2021-06-042-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de> psalm happiness Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * adjust property type declarationArthur Schiwon2021-06-031-1/+1
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * fix code styleArthur Schiwon2021-06-033-3/+2
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>