[eluser]olof84[/eluser]
How should I handle forbidden user actions in a CI project?
For example:
Code:
try {
if($action == 'forbidden')
{
throw new exception('Forbidden action!');
}
} catch (Exception $e)
{
show_error ($e->getMessage(), 500);
}
The example above will call the general_error.php site which has an static header text (in my case: 'Sorry an error happened'). This dose not seem like the best way to handle user abuse.
Further more the example above will not log the user abuse.