[eluser]RyanH[/eluser]
[quote author="inparo" date="1200970502"]The method mentioned above is the same as the array method you outline, only split up into multiple lines.
That said, unless you have used set_fields, $this->validation->whatever won't exist.
Since the post data is overwritten when the validation runs you could try:
Code:
$this->session->set_userdata('email', $this->input->post('email'));
[/quote]The set_fields(); has been set, so this should work, yet it's not and I'm not sure why. However I will try the other method you tried. Is this any less secure?
[quote author="ekeretex" date="1200970502"]Hi Ryan,
Why not do the redirection in the controller?
Either at the beginning of the class method or in the constructor if you need it to apply to all the methods/pages in that class.
Technically, authentication is not a view function.[/quote]Could you elaborate a bit more on this, please? I'm certainly open to improving my code but still learning CI. As such, I'm not sure how you would put the code in the controller as opposed to the view file?