Tank Auth v1.0 (CI authentication library) |
[eluser]JonoB[/eluser]
[quote author="dansmith65" date="1300494766"][quote author="cyberjunkie" date="1300494309"]Is there a way to get the username ... to every controller or view I have?[/quote] You could call this from the __construct() function in all your controllers. It's not quite what you are asking, but easier than doing it in every method of every controller. Code: $this->load->vars(array( You can read about that function in the user guide: http://ellislab.com/codeigniter/user-gui...oader.html[/quote] Tankauth automatically stores the username in the session. Any reason why that is not good enough? In addition, if you propose putting a method into every controller constructor, then its much better to create MY_Controller extends CI_Controller and just put the method there once...its then available to all your controllers automatically. |
Welcome Guest, Not a member yet? Register Sign In |