1
我讀過here,你可以看到以下內容:FOSUserBundle SECURITY_IMPLICIT_LOGIN事件何時被觸發?
/**
* 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"
我不明白的是純英文的時候該事件被解僱。用戶被記住了嗎?我注意到,如果您複製了受密碼保護的網站的URL並關閉瀏覽器選項卡,請打開一個新選項卡並將URL粘貼回來,用戶仍然會被記錄(可以)但實際上沒有記錄日誌(FOSUserBundle不會更新用戶實體的「lastLogin」字段)。好吧,我知道這是因爲會話已經打開了......很酷...... sooooooo當事件發生的確切時間,考慮到當用戶登錄「正常」時被調用的事件(和方法)是
SecurityEvents::INTERACTIVE_LOGIN => 'onSecurityInteractiveLogin'
謝謝!
SN
謝謝,那就是這樣:) –