留言板

User Deletion

thumbnail
Brett Lewinski,修改在7 年前。

User Deletion

Junior Member 帖子: 54 加入日期: 11-5-4 最近的帖子
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
thumbnail
David H Nebinger,修改在7 年前。

RE: User Deletion

Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
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.
thumbnail
Brett Lewinski,修改在7 年前。

RE: User Deletion

Junior Member 帖子: 54 加入日期: 11-5-4 最近的帖子
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 emoticon

Thanks for the help it is much appreciated.

Brett
thumbnail
David H Nebinger,修改在7 年前。

RE: User Deletion

Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
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.