• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question on auth check with simplelogin

#11
[eluser]Sumon[/eluser]
why not this way? create 2 separate controller in the following way
Code:
class MyPROG extends Controller {
    function MyPROG ()
    {
        parent::Controller();
             $user_table = 'users';
         $this->load->helper(array('form', 'url'));

         if(!$this->session->userdata('logged_in'))
             redirect('auth/login');
    }
class Auth extends Controller {
    function Auth()
    {
       parent::controller();
    }
    function login()
    {
       $this->load->view('login_page');
    }

#12
[eluser]San2k[/eluser]
[quote author="Sumon" date="1221165731"]why not this way? create 2 separate controller in the following way
Code:
class MyPROG extends Controller {
    function MyPROG ()
    {
        parent::Controller();
             $user_table = 'users';
         $this->load->helper(array('form', 'url'));

         if(!$this->session->userdata('logged_in'))
             redirect('auth/login');
    }
class Auth extends Controller {
    function Auth()
    {
       parent::controller();
    }
    function login()
    {
       $this->load->view('login_page');
    }
[/quote]

Works grate! Thanks allot!

Thanks for help to everyone.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.