Carl Schwan
9095a36b94
refactor(dbal): Port away from getDatabasePlatform() instanceof pattern
...
Use getDatabaseProvider instead.
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-13 13:44:08 +07:00
Kate
7e8926011d
Merge pull request #55463 from nextcloud/fix/user-group-manager-return-type
2025-10-01 16:30:23 +07:00
provokateurin
dce2672b98
fix(IUserManager): Use correct return type for searchDisplayName method
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-10-01 12:48:43 +07:00
provokateurin
fb4348e3bc
fix(IUserManager): Fix deprecation of search method
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-10-01 12:08:58 +07:00
Ferdinand Thiessen
660f3f6fd1
refactor: use logical `&&` `||` instead of weak `and` `or` operators
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-09-27 23:02:18 +07:00
Louis Chemineau
1d91e40fe8
feat: Support limit argument in `getSeenUsers`
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-09-05 12:45:38 +07:00
Carl Schwan
5215954ee4
perf(users): Create lazy users in IUserManager::getSeenUsers
...
Particularly relevant in occ commands/background jobs like the trashbin
expiration which only needs the user ids and not the full information.
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-09-03 15:24:02 +07:00
Carl Schwan
c21b8169ff
refactor(querybuilder): Port away from qb::execute() in lib/
...
Replace by either executeStatement or executeQuery
Signed-off-by: Carl Schwan <carl.schwan@nextclound.com>
2025-09-02 11:55:56 +07:00
Robin Appelman
8350fea770
fix: increase how long we cache display names
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-08-11 11:20:05 +07:00
John Molakvoæ
1bc1902476
Merge pull request #53887 from nextcloud/fix/lower-email-case
2025-07-11 09:03:05 +07:00
Daniel Calviño Sánchez
4fcadd630b
fix: Throw specific LoginException when the user is disabled
...
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-07-10 15:09:25 +07:00
skjnldsv
027471b146
fix: force lowercase emails
...
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-07-10 09:10:01 +07:00
Ferdinand Thiessen
5981b7eb51
chore: apply new CSFixer rules
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
# Conflicts:
# apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
2025-07-01 16:26:50 +07:00
Samuel Bizien Filippi
a14cade3ac
feat(core): add cookie_domain config option
...
Signed-off-by: Samuel Bizien Filippi <samuel.bizien-filippi@finances.gouv.fr>
2025-06-16 15:33:48 +07:00
Joas Schilling
8b70f59015
chore(cs): Apply autofixes
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-05-29 09:18:12 +07:00
rakekniven
78bd9ad29f
chore(i18n): Improved wording
...
Signed-off-by: rakekniven <2069590+rakekniven@users.noreply.github.com>
2025-05-29 01:09:55 +07:00
rakekniven
c8da8628c3
chore(i18n): Add hint for translators
...
Signed-off-by: rakekniven <2069590+rakekniven@users.noreply.github.com>
2025-05-29 01:09:55 +07:00
Ferdinand Thiessen
e143921896
feat(IUser): add `getQuotaBytes` method to get machine readable quota
...
Proper replacement for deprecated `OC_Util::getUserQuota`.
Also we still use this in some cases we can now replace, moreover it
just makes sense to have a machine readable format in the API instead of
only the human readable format which is less precise.
Alings also with `getQuota` of the quota storage, which already returned
the machine readable format.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-05-22 12:50:38 +07:00
Ferdinand Thiessen
1ae3fa4003
chore: replace leagcy OC_Helper calls with OCP\Util
...
- Replace legacy calls with OCP\Util
- Add missing deprecation notices
- Inline implementation in OCP\Util and call it from OC_Helper
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-05-14 10:18:04 +07:00
Joas Schilling
1ada9910b1
fix(user): Introduce a public constant for max length of user id
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-04-17 09:50:12 +07:00
Joas Schilling
775ca882f3
fix(usermanager): Don't throw when checking if a too long user id is an existing user
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-04-16 17:47:28 +07:00
Côme Chilliet
ddd7d4ed13
fix: Deprecate OC_User methods related to user backends
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-04-10 11:12:25 +07:00
provokateurin
8da9c0f48c
Revert "refactor: add migration for email setting"
...
This reverts commit e7859f0dac .
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-04-07 09:55:09 +07:00
Christoph Wurst
5003467f98
fix(session): Only mark sessions of permanent tokens as app passwords
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2025-04-03 10:08:15 +07:00
Ferdinand Thiessen
e7859f0dac
refactor: add migration for email setting
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-04-02 19:06:25 +07:00
provokateurin
eb98e99530
fix(settings): Handle email change restriction separately from display name change restriction
...
Co-authored-by: provokateurin <kate@provokateurin.de>
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Co-authored-by: Louis <louis@chmn.me>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-04-02 19:06:25 +07:00
Louis Chemineau
22e02d1c1e
chore: Refactor callForSeenUsers to use getSeenUsers
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-03-30 08:54:41 +07:00
Louis Chemineau
275b32d513
feat: Implement getSeenUsers to iterate over users
...
This method uses an iterator.
This is lighter on resources and gives more control to the caller
Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-03-30 08:54:41 +07:00
Git'Fellow
18de9be0e2
fix(database): Cast users count to integer
...
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2025-03-20 12:00:57 +07:00
Côme Chilliet
30382a5d8d
chore: Remove now unused methods from User manager
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-03-10 11:30:18 +07:00
Côme Chilliet
0b449f302b
fix: Correctly count disabled users for SAML groups subadmins
...
If too many users return -1 as for LDAP so that link is shown
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-03-10 11:30:18 +07:00
Cleopatra Enjeck M.
32e46a8b3a
fix: use mb_strtolower to convert login name
...
Signed-off-by: Cleopatra Enjeck M. <patrathewhiz@gmail.com>
2025-03-05 05:00:24 +07:00
Cleopatra Enjeck M.
a6d6a1fa9e
fix: Improve string comparison
...
Signed-off-by: Cleopatra Enjeck M. <patrathewhiz@gmail.com>
2025-03-05 05:00:24 +07:00
Cleopatra Enjeck M.
6690a28cc0
fix: Use case insensitive check when validating login name
...
Signed-off-by: Cleopatra Enjeck M. <patrathewhiz@gmail.com>
2025-03-05 05:00:24 +07:00
Ferdinand Thiessen
3c4feff028
fix: Move login via email logic to local backend
...
Backends can decide which names they accept for login,
e.g. with user_ldap you can configure arbitrary login fields.
This was a hacky approach to allow login via email,
so instead this is now only handled by the local user backend.
This also fixes some other related problems:
Other logic relys on `backend::get()` which was not handling email,
so e.g. password policy could not block users logged in via email
if they use out-dated passwords.
Similar for other integrations, as the user backend was not consistent with
what is a login name and what not.
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-03-03 18:02:07 +07:00
Côme Chilliet
892f815d2e
fix: Fix a small typing problem is user manager
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-01-14 17:21:40 +07:00
Côme Chilliet
c3228ee709
fix: Implement new interface instead of deprecated one in Database backend
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-01-14 12:41:56 +07:00
Côme Chilliet
e187e4e87f
feat(updatenotification): Add a limit to user count from LDAP so save performances
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-01-14 12:26:24 +07:00
Côme Chilliet
b995912207
feat(users): Use -1 for unknown firstLogin instead of setting it to current date
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-01-07 16:30:22 +07:00
Côme Chilliet
baf7293cfe
feat: Add first login timestamp of each user to oc_preferences and user:info output
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-01-07 16:29:50 +07:00
Benjamin Gaussorgues
79db082fe6
fix(users): improve recently active search
...
- 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>
2024-10-30 07:53:10 +07:00
dependabot[bot]
bb598c8451
chore(deps): Bump nextcloud/coding-standard in /vendor-bin/cs-fixer
...
Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard ) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/nextcloud/coding-standard/releases )
- [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md )
- [Commits](https://github.com/nextcloud/coding-standard/compare/v1.3.1...v1.3.2 )
---
updated-dependencies:
- dependency-name: nextcloud/coding-standard
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-10-19 07:57:35 +07:00
Git'Fellow
a1681b0756
chore(db): Apply query prepared statements
...
Fix: psalm
fix: bad file
fix: bug
chore: add batch
chore: add batch
chore: add batch
fix: psalm
2024-10-17 20:30:47 +07:00
provokateurin
51d9d63a01
chore: Use more gender neutral language
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-10-14 13:59:24 +07:00
provokateurin
54ec472d9a
fix(BackgroundJobs): Adjust intervals and time sensitivities
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-10-08 11:26:53 +07:00
Ferdinand Thiessen
d57a2dd465
fix: Skip users that still exist in backend
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-09-26 20:48:45 +07:00
Ferdinand Thiessen
16833aff86
fix: Make user removal more resilient
...
Currently there is a problem if an exception is thrown in `User::delete`,
because at that point the user is already removed from the backend,
but not all data is deleted.
There is no way to recover from this state, as the user is gone no information is available anymore.
This means the data is still available on the server but can not removed by any API anymore.
The solution here is to first set a flag and backup the user home,
this can be used to recover failed user deletions in a way the delete can be re-tried.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-09-26 20:48:37 +07:00
Louis Chemineau
22d5d29c01
fix(users): Don't crash if disabled user is missing in the database
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-09-23 10:40:38 +07:00
Ferdinand Thiessen
a8f46af20f
chore: Add proper deprecation dates where missing
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-09-20 00:46:03 +07:00
provokateurin
9836e9b164
chore(deps): Update nextcloud/coding-standard to v1.3.1
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-19 14:21:20 +07:00