CodeIgniter Forums
control login - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Libraries & Helpers (
+--- Thread: control login (/thread-51280.html)

control login - El Forum - 04-27-2012

Hello everyone, I have the following code in the page view:
$CI = get_instance();
if ($CI->tank_auth->is_logged_in())
// yes
// no
I would insert it into the controller and not in view, perhaps returning as a result of a variable you can control the view, if it sees a div logged in, otherwise you will see another ..... how can I do.
Thanks to all