[eluser]IamPrototype[/eluser]
I want to code it so my admins can access the front end under maintenance like they can access back-end. I know how to build it, but I'd like to know if this code I'll show you know is the best way to do it
again only focus on the FIRST if() that checks if the user is logged and admin. Is there a better way to do it? Checking logged in and admin, maybe put it all together in a single line code.
Code:
if( logged_in() AND $this->user->item->('role') == 1) {
if( $this->preference->item('maintenance_mode') AND $this->uri->rsegment(1) != 'auth')
{
redirect('auth/maintenance','location');
}
}