留言板
User Deletion
Greeting -
Just curious what happens to user data if the user who is the owner of the data is deleted (not deactivated) from the portal? Is the data removed with the user? If not whom is assigned ownership of the data? I haven't been able to find it documented anywhere.
Your help is greatly appreciated!
Thanks
Brett
Just curious what happens to user data if the user who is the owner of the data is deleted (not deactivated) from the portal? Is the data removed with the user? If not whom is assigned ownership of the data? I haven't been able to find it documented anywhere.
Your help is greatly appreciated!
Thanks
Brett
Liferay does not use enforced foreign keys. The original user id will stick with the record, you'll just end up with errors in the logs about missing users and such.
I typically recommend not deleting user accounts as it loses your logical key reference data. It's fine to leave the users as disabled, they won't be able to log in, and your ownership details will still be valid.
I typically recommend not deleting user accounts as it loses your logical key reference data. It's fine to leave the users as disabled, they won't be able to log in, and your ownership details will still be valid.
David
Thanks, unfortunately we need to completely remove users who's accounts are no longer valid. It would be nice if Liferay handled the errors more graciously rather than gunking up the logs
Thanks for the help it is much appreciated.
Brett
Thanks, unfortunately we need to completely remove users who's accounts are no longer valid. It would be nice if Liferay handled the errors more graciously rather than gunking up the logs
Thanks for the help it is much appreciated.
Brett
You could build out a model listener for user and, onBeforeRemove(), walk the system changing ownership for files/folders/posts/etc. that you want to have updated, but it's a manual process. Once you start building it out, you'll realize why LR i) doesn't do that themselves because of the complexity and the decision about who should own (as owner affects permissioning) and ii) it takes some time to complete, especially if you're getting rid of a prolific contributor.