Welcome Guest, Not a member yet? Register   Sign In
calling a controller from another controller.
#1

[eluser]nealumney[/eluser]
Hi Folks,

I have a process which validates whether as user is logged in, or a session has ended (thank you CI for making this very easy). But if the session has ended, or the user is not logged in, I want to re-direct them to a login page. If they are logged in then I want the controller to carry on as if nothing had happened. Is there anyway to use CI to re-direct the user to another controller? Or do I just use standard php to re-direct?

Thanks,

Neal
#2

[eluser]Thorpe Obazee[/eluser]
Code:
redirect('controller/method')

You probably need this to redirect them to the login page.
#3

[eluser]nealumney[/eluser]
Sorry for being such an idiot!!
Thank you very much for such a quick reply, and yes I do. I did look for this, but just could not find it, still I am learning with every new thing.

Neal
#4

[eluser]Thorpe Obazee[/eluser]
I still haven't 'read' everything and I forget things a lot. It's not uncommon (I think).




Theme © iAndrew 2016 - Forum software by © MyBB