Added FAILED_LOGIN event
This commit is contained in:
Lorenzo Milesi
2020-02-05 21:34:39 +01:00
parent 554400d04a
commit a1c5c364e6
4 changed files with 7 additions and 0 deletions

View File

@ -1,4 +1,5 @@
# CHANGELOG # CHANGELOG
- Fix #306: Add event for failed login (ivan-cc)
- Fix #347: Only pass fields known to User model in registrationControl->actionRegister() (BillHeaton) - Fix #347: Only pass fields known to User model in registrationControl->actionRegister() (BillHeaton)
- Fix #346: Update ReCaptcha guide to not use AJAX (BillHeaton) - Fix #346: Update ReCaptcha guide to not use AJAX (BillHeaton)
- Fix #345: Update ReCaptcha guide to add scenarios() in recoveryForm (BillHeaton) - Fix #345: Update ReCaptcha guide to add scenarios() in recoveryForm (BillHeaton)

View File

@ -21,6 +21,7 @@ On Controllers
- **SecurityController** - **SecurityController**
- **FormEvent::EVENT_BEFORE_LOGIN**: Occurs before a user logs into the system - **FormEvent::EVENT_BEFORE_LOGIN**: Occurs before a user logs into the system
- **FormEvent::EVENT_AFTER_LOGIN**: Occurs after a user logs into the system - **FormEvent::EVENT_AFTER_LOGIN**: Occurs after a user logs into the system
- **FormEvent::EVENT_FAILED_LOGIN**: Occurs when user failed login
How to Work With Form Events How to Work With Form Events
---------------------------- ----------------------------

View File

@ -148,6 +148,10 @@ class SecurityController extends Controller
return $this->goBack(); return $this->goBack();
} }
else
{
$this->trigger(FormEvent::EVENT_FAILED_LOGIN, $event);
}
} }
return $this->render( return $this->render(

View File

@ -27,6 +27,7 @@ class FormEvent extends Event
const EVENT_AFTER_LOGIN = 'afterLogin'; const EVENT_AFTER_LOGIN = 'afterLogin';
const EVENT_BEFORE_REGISTER = 'beforeRegister'; const EVENT_BEFORE_REGISTER = 'beforeRegister';
const EVENT_AFTER_REGISTER = 'afterRegister'; const EVENT_AFTER_REGISTER = 'afterRegister';
const EVENT_FAILED_LOGIN = 'failedLogin';
protected $form; protected $form;