Welcome Guest, Not a member yet? Register   Sign In
Site wide login
#6

[eluser]roj[/eluser]
More a reference for myself:

create your own class:

class Initial
{
function __construct()
{
$CI =& get_instance();
$CI->load->helper('url');
$CI->load->library('session');

if (($CI->session->userdata('logged') != true) && $CI->uri->segment(1) != 'login')
{
redirect('login');
}
}
}

and save it as Initial, then autoload it with the other autoload classes in autoload.php.

My problem was in the naming convention - I didn't realise that your own classes had to stick to PHPs capitalised filenames....

Anyway, thanks for the help!


Messages In This Thread
Site wide login - by El Forum - 09-17-2008, 05:07 AM
Site wide login - by El Forum - 09-17-2008, 05:10 AM
Site wide login - by El Forum - 09-17-2008, 05:16 AM
Site wide login - by El Forum - 09-17-2008, 05:25 AM
Site wide login - by El Forum - 09-17-2008, 08:28 AM
Site wide login - by El Forum - 09-17-2008, 09:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB