I'm coding a system that has a requirement to only "hide" a deleted user. In other words, the user is never deleted and all his actions in the system are not deleted to. But, of course, the user has to be omitted in searches, has their login denied and so on...
I'm trying to do this by adding a column inactive
in the user
table in the database. And I'm filtering all the search results manually. But, I'm noticing that this coding pattern can be very dangerous and very complicated in the future, as the application grows.
I've worked with Ruby on Rails too, and there is a Gem/library called Act as Paranoid, that has exactly this behavior.
Do you know if there is any library that can handle this? Or the Zend Framework itself can have this behavior without manual control of the situation?
Any thoughts on this?
Thank you for your time.