-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
local storage is no longer getting cleaned up when user is deleted with occ user:delete #28791
Comments
On my local test setup the user files are removed (from db and filesystem) also with local storage. When the user delete process fails you should see a error message in the user manager and also exceptions are logged. |
I was deleting from the server using occ user:delete, nothing indicated a problem. I also had logging set to debug and no exceptions were logged in Apache or nextcloud during the delete. |
I just changed my user.php file to the normal one and confirmed that deleting a user from the web gui does remove their data correctly, but doing so with occ user:delete does not. Maybe the proper events aren't fired when deleting a user from the command? You can't delete ldap remnants from the web gui, so I'm keeping my changes for now. |
The problem is that the Listener classes are connected in |
I figured it would be something like that. I guess not many people are syncing ldap users? or not cleaning them up anyway. |
It is not limited to LDAP users in my experience, I have it with local users as well. |
A workaround for this problem is to use the ocs API instead of the user:delete command:
|
Thanks for this. I'm using it now to do my monthly cleanup of ldap-remnants and it's working. |
My local storage is no longer getting cleaned up since PR 26792
I manually put the removed lines from /lib/private/User/User.php back into my instance since I had a bunch of users to delete yesterday and didn't want to manually clear the storage and _storages and _filecache tables for all of them.
Steps to reproduce
Expected behaviour
local storage for the user should be deleted and relevant entries in _storages and _filecache tables should be cleared
Actual behaviour
user storage and database entries are not cleared
Server configuration
Nextcloud 22.1.1
Ubuntu 20.04.2
Apache 2.4.41
PHP 7.4.3
Signing status:
Signing status
List of activated apps:
App list
Nextcloud configuration:
Config report
Are you using external storage, if yes which one: No
Are you using encryption: no
Are you using an external user-backend, if yes which one: ldap and local users
Logs
Web server error log
Web server error log
Nextcloud log (data/nextcloud.log)
Nextcloud log
The text was updated successfully, but these errors were encountered: