Records in `oc_profile_config` don't get deleted when user is deleted
Open
Nobody has claimed this yet.
0. Needs triage
26-feedback
bug
feature: profile
feature: users and groups
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- Nextcloud Server is running on 64bit capable CPU, PHP and OS.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
If I delete a user from the system who has an entry in the database table oc_profile_config, this record does not get deleted.
Steps to reproduce
- create a new user
- log in as that user
- make changes to the visibility settings in the profile
- check for record in oc_profile_config
- delete user from system
- check for record in oc_profile_config
Expected behavior
I would expect the record in oc_profile_config to be delete when the owning user is deleted from the system
Installation method
None
Nextcloud Server version
26
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.1
Web server
Nginx
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"schulcloud.waldorfschule-og.de",
"cloud.waldorfschule-og.de"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "26.0.1.1",
"overwrite.cli.url": "https:\/\/schulcloud.waldorfschule-og.de",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"mail_smtpmode": "smtp",
"mail_smtpsecure": "tls",
"mail_sendmailmode": "smtp",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtpauthtype": "LOGIN",
"mail_smtpauth": 1,
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "587",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"memcache.local": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6379
},
"maintenance": false,
"theme": "",
"loglevel": 2,
"default_phone_region": "DE",
"account_manager.default_property_scope": {
"phone": "v2-private",
"email": "v2-private"
}
}
}
List of activated Apps
Enabled:
- activity: 2.18.0
- bruteforcesettings: 2.6.0
- circles: 26.0.0
- cloud_federation_api: 1.9.0
- comments: 1.16.0
- contacts: 5.2.0
- contactsinteraction: 1.7.0
- dashboard: 7.6.0
- dav: 1.25.0
- federatedfilesharing: 1.16.0
- federation: 1.16.0
- files: 1.21.1
- files_pdfviewer: 2.7.0
- files_rightclick: 1.5.0
- files_sharing: 1.18.0
- files_trashbin: 1.16.0
- files_versions: 1.19.1
- firstrunwizard: 2.15.0
- logreader: 2.11.0
- lookup_server_connector: 1.14.0
- nextcloud_announcements: 1.15.0
- notifications: 2.14.0
- oauth2: 1.14.0
- onlyoffice: 7.8.0
- password_policy: 1.16.0
- photos: 2.2.0
- privacy: 1.10.0
- provisioning_api: 1.16.0
- recommendations: 1.5.0
- related_resources: 1.1.0-alpha1
- serverinfo: 1.16.0
- settings: 1.8.0
- sharebymail: 1.16.0
- support: 1.9.0
- survey_client: 1.14.0
- systemtags: 1.16.0
- text: 3.7.2
- theming: 2.1.1
- twofactor_backupcodes: 1.15.0
- updatenotification: 1.16.0
- user_status: 1.6.0
- viewer: 1.10.0
- weather_status: 1.6.0
- workflowengine: 2.8.0
Disabled:
- admin_audit: 1.16.0
- calendar: 4.2.1 (installed 4.2.1)
- documentserver_community: 0.1.13 (installed 0.1.13)
- encryption: 2.14.0
- files_external: 1.18.0
- files_markdown: 2.3.6 (installed 2.3.6)
- spreed: 15.0.2 (installed 10.0.9)
- suspicious_login: 4.4.0
- twofactor_totp: 8.0.0-alpha.0
- user_ldap: 1.16.0
Nextcloud Signing status
No errors have been found.
Nextcloud Logs
No response
Additional info
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the user-deletion entry point and the cleanup handling for the oc_profile_config table. Reproduce the listed steps, then add coverage for deletion of the profile record and verify that the record is removed when its owning user is deleted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mariadb, php
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100