Hey guys, I was wondering if Models have something similar to beforeSave that would allow me to modify a select query? Something that would be called "beforeSelect" if it existed.
Why I'd need that? I'm working on a multi-user application and I want to diminish the risks of an user seeing other users data because of a mistake in code. So in every query I need to set the user_id. I'm looking for a way to do that automatically for every query! So I would intercept the query and inject the right user_id.
Do you have suggestions to accomplish that?