mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Adding extension hooks to Member isLockedOut() and registerSuccessfulLogin()
This commit is contained in:
parent
d9cffe5f53
commit
0d0d18612d
@ -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