Reputation: 859
I run a site which allows users to create profiles, which naturally attracts SEO spammers trying to push their own links. I'm developing a one-click admin system to banish these profiles (but keep the details recoverable in case of error) - which approach below would be considered 'best practice' (if any)?
1) Create a copy of the users
model (e.g. banned_users
) and move banned users across to this model so that their accounts are disabled
2) Add a banned_user
flag to the user profile and add a callback to every user action which checks whether the field returns true
My instinct says that 1 is cleaner - is there a better way of doing this?
Upvotes: 0
Views: 53
Reputation: 15917
Personally, given your described requirements, I would use option 2 (toggle a 'banned' flag to true). It seems cleaner to me because:
Upvotes: 2