简体   繁体   English

对symfony2和fos用户进行多重检查

[英]Mutltiple check on symfony2 and fos User

To migrate an old user sytem to a new cute symfony one, i'm trying to do a second check after fosuser password check. 要将旧的用户系统迁移到新的可爱的symfony系统,我正在尝试检查fosuser密码后进行第二次检查。

It should be like this: 应该是这样的:

  1. user enter its login infos 用户输入其登录信息
  2. Fosuser check information Fosuser检查信息
  3. if check of fosuser is wrong, then do a first encrypt on user password and check the encripted with fosuser normal check 如果对fosuser的检查是错误的,则首先对用户密码进行加密,并检查用fosuser进行的普通检查
  4. then, if password is ok, log user and if its ko, redirect to login form 然后,如果密码确定,则登录用户,如果密码为ko,则重定向到登录表单

It think i could do that by override the login action, or with an handler, bu I din't find the solution. 它认为我可以通过覆盖登录操作或使用处理程序来做到这一点,但我找不到解决方案。

Could you please help me save days ? 你能帮我节省几天吗?

Ok, finally after trying a lot of solutions, here is what i've done. 好吧,终于在尝试了很多解决方案之后,这就是我所做的。 I have created a checklogin action, where I recreate the entire check and login logik. 我创建了一个checklogin操作,在其中重新创建整个检查和登录logik。 I think the best way to do this should be a handler, but I could'nt find how to put an handler on the check password event (or check login or something). 我认为最好的方法应该是处理程序,但是我找不到如何在检查密码事件(或检查登录名或其他内容)上放置处理程序。

I'm still interested in your solutions if you have a better way to do this. 如果您有更好的方法,我仍然对您的解决方案感兴趣。

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

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