简体   繁体   English

我可以使用CodeIgniter表单验证类登录用户吗

[英]Can I use CodeIgniter form validation class to log a user in

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. 我知道如何为codeigniter编写自定义表单验证,并且正在考虑将我的登录验证功能写入表单验证回调函数中。 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. 我的理论是,这是使用codeigniter表单验证类向用户反馈登录失败的简单方法。

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? 这会增加我的Web应用程序登录安全性的潜在弱点吗?

You can surely use Codeigniter's form validation library for this purpose. 为此,您一定可以使用Codeigniter的表单验证库。

However, I would advise against writing your own authentication system and use an existing one such as Tank Auth or ION Auth . 但是,我建议您不要编写自己的身份验证系统,而应使用现有的身份验证系统,例如Tank AuthION Auth

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM