掲示板

User Deletion

thumbnail
7年前 に Brett Lewinski によって更新されました。

User Deletion

Junior Member 投稿: 54 参加年月日: 11/05/04 最新の投稿
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
7年前 に David H Nebinger によって更新されました。

RE: User Deletion

Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
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
7年前 に Brett Lewinski によって更新されました。

RE: User Deletion

Junior Member 投稿: 54 参加年月日: 11/05/04 最新の投稿
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
7年前 に David H Nebinger によって更新されました。

RE: User Deletion

Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
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.