In cakephp, I've a controller that should receive a parameter and then call model to work with database to show the result in a view. Pretty common mvc approach.
Imagine the controller as "Insert a new post" which should be associated to an specific user.
So, the URL should be: http://mysite/inspost/(user_id).
The problem is, when URL is like http://mysite/inspost/
It will show the same view and will insert the new post even if the user_id has not been specified.
How can I control this?