Welcome Guest, Not a member yet? Register   Sign In
Protect site based on config setting?
#1

[eluser]Sven Delle[/eluser]
Hi,

I'd like to create a sort of site protection routine using a custom config file:

site_config.php:

Code:
$site_config['site_protected'] = true/false;

And based on that set the default controller (in the routes.php file) accordingly to either:

site or login (controller)

How do I go about doing this? Or should I have a totally different approach?

The idea is to be able to easily enable or disable site protection.

Any ideas?




Theme © iAndrew 2016 - Forum software by © MyBB