Welcome Guest, Not a member yet? Register   Sign In
Login System - Code Igniter just makes things excessively complex..
#14

[eluser]nuwanda[/eluser]
I just have a helper that checks for login status. Autoload the helper.

Code:
<div id='nav'>
&lt;?php

if(is_logged_in())
{
  if(is_admin())
  {
    echo anchor('admin','Admin Dashboard');
  }

  echo anchor('user/logout','Logout');
  echo anchor('users/profile','Profile' . '&nbsp;[' . $_SESSION['user_name'] . ']');

}
else
{
    echo anchor('user/login','Login');
    echo anchor('user/signup','Signup');                        
}

echo '&nbsp;' . anchor(base_url(),'Home');
?&gt;

</div>&lt;!--end nav--&gt;


Messages In This Thread
Login System - Code Igniter just makes things excessively complex.. - by El Forum - 08-18-2010, 01:40 AM



Theme © iAndrew 2016 - Forum software by © MyBB