我已阅读here,您可以看到以下内容:
/**
* The SECURITY_IMPLICIT_LOGIN event occurs when the user is logged in programmatically.
*
* This event allows you to access the response which will be sent.
* The event listener method receives a FOS\UserBundle\Event\UserEvent instance.
*/
const SECURITY_IMPLICIT_LOGIN = 'fos_user.security.implicit_login';
我还阅读了here,您可以阅读:
"Added an event when logging the user in implicitly"
当事件被解雇时,我不明白的是用简单的英语。是用户被记住的时候吗?我注意到如果你复制我的密码保护网站的网址并关闭浏览器标签,打开一个新选项卡并粘贴网址,用户仍然记录(这没关系)但实际上没有记录(FOSUserBundle不更新用户实体的“lastLogin”字段)。好吧,我明白这是因为会话已经打开了...很酷... sooooooo这个事件什么时候发生的,考虑到当用户登录“正常”时调用的事件(和方法)是
SecurityEvents::INTERACTIVE_LOGIN => 'onSecurityInteractiveLogin'
谢谢!
SN
答案 0 :(得分:1)
快速搜索github repo表示只发送FOS\UserBundle\EventListener\AuthenticationListener。
这表明在注册完成/确认和密码重置完成后将触发fos_user.security.implicit_login
(如果用户已启用并且可以登录)。