When a user account has been deleted, ownCloud will clean up after it. Files, group memberships and preferences are cleared and a notification is send to apps so they can clean up on their end. However, an LDAP user account cannot be deleted, since ownCloud does not write to the directory. Of course, an account can be deleted on the LDAP server. Unfortunately, we are not being informed about this and so data from LDAP users was kept around even when their accounts were long gone.
We needed to think of a way how to get rid of unwanted remains. And we did, and we implemented it, an this is how it works.