![]() |
Ion auth login form - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Ion auth login form (/showthread.php?tid=41972) |
Ion auth login form - El Forum - 05-22-2011 [eluser]malcomhfc[/eluser] Hi there. Im a little new to php and codeigniter. Although i have background in other programming languages. ![]() I am using the Ion auth library and im making an admin panel for administrating my website. I have the main controller admin which extends a core controller Admin_controller. - based on phil surdgens blog posts. The Admin_controller checks for permissions etc in the admin panel. Im trying to make a login page. For example if not logged in then load function login() but I cant seem to make a login form on my view work with Code: $this->ion_auth->login I tried copying the login function from the example auth controller but it gave me errors Quote:Message: Undefined variable: email the view is: Code: <?php echo form_open("admin/login");?> i also tried Code: <?php echo form_open('admin/login'); ?> Any help on a simple login form which will run the admin/login function correctly please? Any help would be greatly appretiated ![]() Ion auth login form - El Forum - 05-22-2011 [eluser]Th3FalleN[/eluser] I actually had the same exact problem 2 days ago, if you look at the example controller you'll notice it is passing the variables to the form, i myself didn't like that method so tweaked it to this. Code: echo form_open('admin/validate_credentials', array('class' => 'form col')); theres some extra code obviously because thats from my live controller, but that should give you what you need to use it correctly. Ion auth login form - El Forum - 05-23-2011 [eluser]malcomhfc[/eluser] I removed all the extra code and the form works. Thanks a lot Th3FalleN. ![]() Ion auth login form - El Forum - 05-23-2011 [eluser]Th3FalleN[/eluser] No problem at all that auth system is pretty handy glad you could get it working. |