Author: Ivan <10677129+ivan-cc@users.noreply.github.com>
Added FAILED_LOGIN event
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
# CHANGELOG
|
||||
- Fix #306: Add event for failed login (ivan-cc)
|
||||
- Fix #347: Only pass fields known to User model in registrationControl->actionRegister() (BillHeaton)
|
||||
- Fix #346: Update ReCaptcha guide to not use AJAX (BillHeaton)
|
||||
- Fix #345: Update ReCaptcha guide to add scenarios() in recoveryForm (BillHeaton)
|
||||
|
||||
@ -21,6 +21,7 @@ On Controllers
|
||||
- **SecurityController**
|
||||
- **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_FAILED_LOGIN**: Occurs when user failed login
|
||||
|
||||
How to Work With Form Events
|
||||
----------------------------
|
||||
|
||||
@ -148,6 +148,10 @@ class SecurityController extends Controller
|
||||
|
||||
return $this->goBack();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->trigger(FormEvent::EVENT_FAILED_LOGIN, $event);
|
||||
}
|
||||
}
|
||||
|
||||
return $this->render(
|
||||
|
||||
@ -27,6 +27,7 @@ class FormEvent extends Event
|
||||
const EVENT_AFTER_LOGIN = 'afterLogin';
|
||||
const EVENT_BEFORE_REGISTER = 'beforeRegister';
|
||||
const EVENT_AFTER_REGISTER = 'afterRegister';
|
||||
const EVENT_FAILED_LOGIN = 'failedLogin';
|
||||
|
||||
protected $form;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user