aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/User/Manager.php
Commit message (Collapse)AuthorAgeFilesLines
* fix: Fix a small typing problem is user managerenh/limit-ldap-user-countCôme Chilliet2025-01-141-1/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* feat(updatenotification): Add a limit to user count from LDAP so save ↵Côme Chilliet2025-01-141-0/+31
| | | | | | performances Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix(users): improve recently active searchBenjamin Gaussorgues2024-10-301-28/+37
| | | | | | | | | - Remove DISTINCT clause to fix PgSQL - Join user table only if necessary - Don't show people who never connected in active list - Add test Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* fix(users): Don't crash if disabled user is missing in the databaseartonge/fix/prevent_missing_users_from_crashing_disabled_users_searchLouis Chemineau2024-09-231-6/+12
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* chore: Add proper deprecation dates where missingFerdinand Thiessen2024-09-201-1/+1
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* chore(deps): Update nextcloud/coding-standard to v1.3.1provokateurin2024-09-191-1/+1
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* chore: adjust code to adhere to coding standardAnna Larch2024-09-051-1/+1
| | | | Signed-off-by: Anna Larch <anna@nextcloud.com>
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-251-3/+3
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* fix(SetupCheck): Properly check public access to data directoryFerdinand Thiessen2024-08-081-1/+1
| | | | | | | | | | | | | When checking for public (web) access to the data directory the status is not enough as you might have a webserver that forwards to e.g. a login page. So instead check that the content of the file matches. For this the `.ncdata` file (renamed from `.ocdata`¹) has minimal text content to allow checking. ¹The file was renamed from the legacy `.ocdata`, there is a repair step to remove the old one. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix: getLastLoggedInUsers moved from AllConfig/IConfig to IUserManager/Manageryemkareems2024-07-081-0/+43
| | | | Signed-off-by: yemkareems <yemkareems@gmail.com>
* fix: limit and fixLimit removed. negative limit handled in controller. ↵yemkareems2024-07-081-15/+0
| | | | | | removed getUsersSortedByLastLogin from Manager and instead used the config in controller Signed-off-by: yemkareems <yemkareems@gmail.com>
* fix: removed default limit of 25. if null is given all users are fetched or ↵yemkareems2024-07-081-1/+1
| | | | | | if limit is given limit number of users are fetched Signed-off-by: yemkareems <yemkareems@gmail.com>
* fix: removed references to old disabled users code. refactored query as per ↵yemkareems2024-07-081-18/+3
| | | | | | getDisplayNames function. limit and offset added to query. default limit set to 25. Signed-off-by: yemkareems <yemkareems@gmail.com>
* fix: removed the params related to sortMode and order since it sorts by ↵yemkareems2024-07-081-2/+2
| | | | | | lastLogin Signed-off-by: yemkareems <yemkareems@gmail.com>
* fix: doc blocks addedyemkareems2024-07-081-0/+3
| | | | Signed-off-by: yemkareems <yemkareems@gmail.com>
* fix: search and searchDisplayNames reverted to how it was initially as sort ↵yemkareems2024-07-081-2/+1
| | | | | | and order are not required here Signed-off-by: yemkareems <yemkareems@gmail.com>
* fix: search and searchDisplayNames reverted to how it was initially as sort ↵yemkareems2024-07-081-68/+9
| | | | | | and order are not required here Signed-off-by: yemkareems <yemkareems@gmail.com>
* fix: rebased the branch with master and resolved conflictsyemkareems2024-07-081-0/+27
| | | | | | fix: added a new endpoint users/recent and getting users based on last login info in the same. Reverted old code that was breaking LDAP Signed-off-by: yemkareems <yemkareems@gmail.com>
* fix: change orderBy and sort to sortMode and sortOrder. default it to uid ↵yemkareems2024-07-081-15/+15
| | | | | | asc. enable email search by changing query Signed-off-by: yemkareems <yemkareems@gmail.com>
* fix: sort the user getDisplayNames based on lastLogin. Default sort order is ↵yemkareems2024-07-081-6/+6
| | | | | | lastLogin DESC Signed-off-by: yemkareems <yemkareems@gmail.com>
* feat: cs fix run on the changed files and default order by last_login desc. ↵yemkareems2024-07-081-5/+5
| | | | | | Also last_login sort logic changed Signed-off-by: yemkareems <yemkareems@gmail.com>
* feat: add ability to sort users by last_login, uid or displayName. one of ↵yemkareems2024-07-081-8/+68
| | | | | | these needs to be passed as orderBy and sort can be ASC or DESC Signed-off-by: yemkareems <yemkareems@gmail.com>
* chore: Add SPDX headerAndy Scherzinger2024-05-241-30/+4
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* fix: Also search in email field for disabled usersCôme Chilliet2024-05-231-1/+2
| | | | | | To match what is done for Database backend for enabled users Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* feat: Add back searching in disabled user listCôme Chilliet2024-05-231-2/+10
| | | | | | | | When disabled users where moved to their own endpoint we overlooked search, so adding it back. The search is done case-insensitive in uid and display name. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix(User\Manager): Avoid future collisions with updater/audit logsJosh2024-05-061-0/+2
| | | | | Avoid future collisions for not yet created updater and audit log files (at least using default names). Signed-off-by: Josh <josh.t.richards@gmail.com>
* fix: Fix newly spotted psalm issues, add exhaustive typed magic properties ↵Côme Chilliet2024-04-301-19/+10
| | | | | | for LDAP classes Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Merge pull request #43461 from nextcloud/fix/get-rid-of-getloggerF. E Noel Nfebe2024-02-141-1/+2
|\ | | | | chore: Migrate away from OC::$server->getLogger
| * chore: Migrate away from OC::$server->getLoggerCôme Chilliet2024-02-131-1/+2
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | fix: replace `Account name` by `Login`John Molakvoæ2024-02-131-6/+6
| | | | | | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* | feat: rename users to account or personVincent Petry2024-02-131-7/+7
|/ | | | | | Replace translated text in most locations Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* chore: Replace OC::$server->getL10N by OCP\Util::getL10N in lib and some appsCôme Chilliet2024-02-051-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-4/+4
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* Add endpoint for getting disabled user listCôme Chilliet2023-10-091-0/+30
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix!: Remove symfony EventDispatcherInterface from UserJoas Schilling2023-07-271-7/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update version number in since and deprecated annotationsCôme Chilliet2023-04-271-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Make code clearer and bump @ deprecated annotationsCôme Chilliet2023-04-271-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Split new method in a new group backend interfaceCarl Schwan2023-04-271-4/+2
| | | | | | Better for backward compatibility, also move new interfaces to nc 26 Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Optimize retrieving display name when searching for users in a groupCarl Schwan2023-04-271-17/+12
| | | | | | | | | This is recurrent scenario that we are searching for users and then for each users we fetch the displayName. This is inefficient, so instead try to do one query to fetch everything (e.g. Database backend) or use the already existing DisplayNameCache helper. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* also cache backend for user in memory instead of always going to redisRobin Appelman2023-02-101-1/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* spaces are allowed in useridsSimon L2023-01-101-2/+2
| | | | Signed-off-by: Simon L <szaimen@e.mail.de>
* Validate if the user part of a "cloud id" can even be a valid user idJoas Schilling2022-12-091-26/+44
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* LDAP to no register new users when outside of fair use or over limitsArthur Schiwon2022-10-181-11/+6
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Make DisplayNameCache return null if user doesn't existsCarl Schwan2022-08-161-1/+1
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Merge branch 'master' into display-name-cache-publicCarl Schwan2022-08-151-14/+16
|\ | | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
| * Fix psalm issues related to the user backendCarl Schwan2022-05-201-14/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | - Reflect the actual return value returned by the implementation in the the interface. E.g. IUser|bool -> IUser|false - Remove $hasLoggedIn parameter from private countUser implementation. Replace the two call with the equivalent countSeenUser - getBackend is nuallable, add this to the interface - Use backend interface to make psalm happy about call to undefined methods. Also helps with getting rid at some point of the old implementActions Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* | expose displayname cache trough a public interfaceRobin Appelman2022-05-181-0/+11
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Don't check the configvalue for lastLogin which is never nullJoas Schilling2021-12-101-2/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fair use of push notificationsJoas Schilling2021-10-231-1/+6
| | | | | | | | | We want to keep offering our push notification service for free, but large users overload our infrastructure. For this reason we have to rate-limit the use of push notifications. If you need this feature, consider setting up your own push server or using Nextcloud Enterprise. Signed-off-by: Joas Schilling <coding@schilljs.com>
* Use cached user backend info for password loginJoas Schilling2021-09-141-3/+9
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>