Skip to content

[Bug]: Missing Groups (Dropdown) when editing a searched User #61681

Open

Description

@spitzlei

⚠️ This issue respects the following points: ⚠️

Bug description

When editing a user you have searched via Search account and groups, the Member of the following groups and Admin of the following groups Dropdowns are empty.

When I pick the user from the full Userlist without any Text in the Search Field, the Member/Admin-Group Fields are filled.

Steps to reproduce

  1. Go to Accounts (/settings/users/)
  2. Type in a Username in the Searchbox below + New Account
  3. Click on the pen (edit) on the right side to edit the user.
  4. The Fields/Dropdown of Member of the following groups and Admin of the following groups are empty.
  5. Clear the Searchbox, look for the same user by hand and now the edit works.

Expected behavior

Filled Fields/Dropdowns.

Nextcloud Server version

34

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.5

Web server

Apache (supported)

Database engine version

PostgreSQL

Is this bug present after an update or on a fresh install?

Upgraded to a MAJOR version (ex. 31 to 32)

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "serverid": 0,
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "34.0.1.2",
        "overwrite.cli.url": "***REMOVED***",
        "overwriteprotocol": "https",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "default_phone_region": "DE",
        "maintenance": false,
        "mail_smtpmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_sendmailmode": "smtp",
        "mail_smtpport": "465",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "mail_smtpauth": 1,
        "mail_smtpauthtype": "PLAIN",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "loglevel": 0,
        "theme": "",
        "maintenance_window_start": 1
    }
}

List of activated Apps

Enabled:
  - activity: 7.0.0
  - admin_audit: 1.24.0
  - appstore: 1.0.0
  - bruteforcesettings: 7.0.0
  - calendar: 6.5.0
  - circles: 34.0.0
  - cloud_federation_api: 1.18.0
  - comments: 1.24.0
  - contacts: 8.7.2
  - contactsinteraction: 1.15.0
  - dashboard: 7.14.0
  - dav: 1.39.0
  - federatedfilesharing: 1.24.0
  - federation: 1.24.0
  - files: 2.6.0
  - files_downloadlimit: 5.2.0-dev.0
  - files_lock: 34.0.0
  - files_pdfviewer: 7.0.0-dev.0
  - files_reminders: 1.7.0
  - files_sharing: 1.26.0
  - files_trashbin: 1.24.0
  - files_versions: 1.27.0
  - firstrunwizard: 7.0.0-dev.0
  - logreader: 7.0.0
  - lookup_server_connector: 1.22.0
  - nextcloud_announcements: 6.0.0
  - notifications: 7.0.0-dev.1
  - oauth2: 1.22.0
  - office: 1.0.0
  - password_policy: 6.0.0-dev.0
  - photos: 7.0.0
  - privacy: 6.0.0-dev.1
  - profile: 1.3.0
  - provisioning_api: 1.24.0
  - recommendations: 7.0.0
  - related_resources: 5.0.0-dev.0
  - serverinfo: 6.0.0
  - settings: 1.17.0
  - sharebymail: 1.24.0
  - support: 6.0.0
  - survey_client: 6.0.0-dev.0
  - suspicious_login: 12.0.0-dev.0
  - systemtags: 1.24.0
  - text: 8.0.0
  - theming: 2.9.0
  - twofactor_backupcodes: 1.23.0
  - twofactor_totp: 16.0.0
  - updatenotification: 1.24.0
  - user_status: 1.14.0
  - viewer: 7.0.0-dev.0
  - weather_status: 1.14.0
  - webhook_listeners: 1.6.0
  - workflowengine: 2.16.0
Disabled:
  - app_api: 34.0.0 (installed 32.0.0)
  - encryption: 2.22.0
  - files_external: 1.26.0
  - richdocuments: 11.0.0 (installed 11.0.0)
  - richdocumentscode: 26.4.104 (installed 26.4.104)
  - twofactor_nextcloud_notification: 8.0.0
  - user_ldap: 1.25.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

Additional info

No response

Activity

  1. added theissue type on Jun 30, 2026
  2. added
    0. Needs triagePending check for reproducibility or if it fits our roadmap
    on Jun 30, 2026
  3. alimmroth commented on Jul 1, 2026

    @alimmroth

    For me, the behaviour is as follows:

    1. Search for a user
    2. The users "Groups" field is empty
    3. Click on the pen to edit the user
    4. The "Groups" field all of a sudden gets filled

    I also noticed in the past, that it makes a difference if the groups are local, or from LDAP, but I couldn't specify the exact behaviour right now.

    This is a major bug, as it can lead to very wrong assumptions if a user is, for example, in the admin group or not and therefore have security implications.

  4. jernejs commented on Jul 9, 2026

    @jernejs

    I've got the same problem with 34.0.1 – user list shows all groups, but after clicking the pencil to edit user, either no groups, or at most one group is shown in the Member of the following groups drop-down, and if I click Save, the groups are removed from user.

  5. ZoltanJu commented on Jul 13, 2026

    @ZoltanJu

    Same here. with LDAP.
    Workaround for me:
    put a$limit = 5000; into every function in the following file htdocs/apps/provisioning_api/lib/Controller/GroupsController.php
    This ugly patch solved the problem to shown more than 25 group at the same time.
    Two options you have:

    1. do not use search box instead select user from existing groups
    2. is you use the search box, after you open edit popup for a user, type something into group member box like "a" and on the left side you will see all the groups shown. close the popup and open again you will see the users groups now and you can edit it
  6. d1gl3 commented on Jul 28, 2026

    @d1gl3

    Confirming on 34.0.1.2 — this deletes group memberships from the database, it is not only a display bug

    Same as @jernejs above, and I think this is the part that needs raising: when the edit
    dialog opens with incomplete group fields, saving removes the user from every group that
    was not displayed
    , and the rows are actually gone from oc_group_user.

    Reproduction (full admin, Database user backend):

    1. /settings/users/ → type a username in the search box
    2. Click the edit pencil → "Member of the following groups" is empty or shows only a subset
    3. Add one group and save
    4. The user is now a member of only that group — all previously assigned groups are gone

    Verified with occ user:info <uid> before and after, and directly against oc_group_user.
    This is not a caching or rendering artifact.

    Suspected cause: #59406 introduced PATCH /cloud/users/{userId}, which accepts the
    full groups array, and EditUserDialog snapshots the displayed group set and PATCHes
    it as authoritative. Combined with the incomplete population above, the dirty-detection
    diff generates removals for memberships the admin never touched.

    Impact: silent data loss. There is no confirmation prompt, no error shown, and nothing
    written to nextcloud.log. Nextcloud keeps no history of group membership, so without a
    prior database dump the lost assignments are unrecoverable and have to be reconstructed by
    hand. Because group membership gates group folders and group shares, the practical effect
    is unannounced revocation of file access.

    I am on 34.0.1.2. For anyone finding this from the release notes: the 34.0.2 changelog
    contains no fix for this — the group-related entries (#61932, #61936) are display and
    performance only, and no PR currently references this issue.

    Requests:

    • Retitle to reflect that memberships are deleted, not merely hidden — the current title
      reads as cosmetic and this destroys data
    • Triage and label accordingly (data loss / regression), and consider whether the PATCH
      endpoint should reject a groups array that was derived from an incompletely loaded list
    • Backport to stable34 once fixed

    Environment

    • Nextcloud 34.0.1.2, official Docker image
    • User backend: Database. user_ldap is installed but disabled, so LDAP is not a
      precondition for this (cf. @ZoltanJu above)
    • Groups on the instance: 70
    • PHP 8.5.8 (cli) (built: Jul 14 2026 01:27:21) (NTS)
    • mysql:8.4.10
  7. added
    1. to developAccepted and waiting to be taken care of
    and removed
    0. Needs triagePending check for reproducibility or if it fits our roadmap
    on Jul 28, 2026
  8. moved this from To triage to Confirmed in 🧑‍🤝‍🧑 Community triageon Jul 28, 2026
  9. alimmroth commented on Jul 28, 2026

    @alimmroth

    Has anyone had the behaviour that groups are actually removed from the user in 33 or lower? I'm asking because in our 32 instance, the behaviour is, that groups aren't shown until you click on the pencil, but then it seems like all of them are present.

    This would make the bug very critial for older versions as well.

  10. jernejs commented on Jul 28, 2026

    @jernejs

    In 33.0.6, groups are shown in the user list, and when I click on pencil, it started editing in-line (which is a bit clumsier than the dialog in v34, but at least it retains all groups).

  11. jernejs commented on Sep 2, 2026

    @jernejs

    The missing groups bug seems to be fixed as of 34.0.3, but there's a different problem now – there doesn't seem to be any way to dismiss the drop-down once it's open (clicking the up arrow doesn't do anything), which makes it impossible to confirm the changes, as the drop-down covers the Save button.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions