mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #6762 from Quadra-Digital/login-hooks
Add Extension Hooks to Member Login Processes
This commit is contained in:
commit
203963199b
@ -398,7 +398,9 @@ class Member extends DataObject implements TemplateGlobalProvider {
|
||||
* Returns true if this user is locked out
|
||||
*/
|
||||
public function isLockedOut() {
|
||||
return $this->LockedOutUntil && SS_Datetime::now()->Format('U') < strtotime($this->LockedOutUntil);
|
||||
$state = ($this->LockedOutUntil && SS_Datetime::now()->Format('U') < strtotime($this->LockedOutUntil));
|
||||
$this->extend('updateIsLockedOut', $state);
|
||||
return $state;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1685,6 +1687,7 @@ class Member extends DataObject implements TemplateGlobalProvider {
|
||||
$this->FailedLoginCount = 0;
|
||||
$this->write();
|
||||
}
|
||||
$this->extend('onAfterRegisterSuccessfulLogin');
|
||||
}
|
||||
/**
|
||||
* Get the HtmlEditorConfig for this user to be used in the CMS.
|
||||
|
Loading…
Reference in New Issue
Block a user