owncloud/core

View on GitHub
changelog/10.6.0_2020-11-25/37947

Summary

Maintainability
Test Coverage
Bugfix: Clean the user's preferences only if they exist during user sync

Previously, the user's preferences were cleaned during the user:sync command.
This was done regardless of the preferences existance, which was causing the
"userpreference.afterDeleteValue" event to be triggered always, and then,
as consequence, the admin_audit app was logging those events.
Basically, this bug was causing a log flood by the admin_audit app even if
those preferences weren't there in the first place.

Now we check first if those preferences exist before attempting to delete them.
If they exist, the admin_audit app will still log that deletion, but if not
nothing happens because the deletion won't be attempted.

https://github.com/owncloud/core/pull/37947