Code-Igniter: calling a controller within a controller
Posted: Sat Aug 04, 2012 2:17 pm
Hello - this pertains to CI but i guess the issue is similar for all frameworks.
I am using an authentication library (tank-auth) to handle login/registration etc.
- so i already have an auth controller ( say Controller A) - with a method 'login' - that calls the view 'login-form'.
This is working perfectly well. So far so good
However now i need to show the login form on the top of each page (say on home page) - this home page is controlled by a different controller - say Controller B.
Now how do i call the method in controller B (say the login method) from controller A ?
I am using an authentication library (tank-auth) to handle login/registration etc.
- so i already have an auth controller ( say Controller A) - with a method 'login' - that calls the view 'login-form'.
This is working perfectly well. So far so good
However now i need to show the login form on the top of each page (say on home page) - this home page is controlled by a different controller - say Controller B.
Now how do i call the method in controller B (say the login method) from controller A ?