Take the 2-minute tour ×

I know how to write custom form validation's for codeigniter and I am considering writing my login validation function into a form validation call back function. My theory for this is it is an easy way to use the codeigniter form validation class to feedback to the user that the login failed.

I can't see anything wrong with this and certainly it would work but is there anything inherently bad in this approach? Would it add a potential weakness in the security of my web apps login?

share|improve this question
Yes, that's what the form validation is for! –  Gurrewe Jun 7 '12 at 20:11

1 Answer 1

up vote 1 down vote accepted

You can surely use Codeigniter's form validation library for this purpose.

However, I would advise against writing your own authentication system and use an existing one such as Tank Auth or ION Auth.

share|improve this answer
I'm using ion_auth in a current project, and I'd definitely recommend it over a hand-rolled user auth system. –  xbonez Jun 7 '12 at 20:13
Great, will look into those - thanks! –  SimonBarker Jun 7 '12 at 20:25

Your Answer


