Created
August 19, 2019 21:42
-
-
Save Firesphere/d776eafbe72acbef8d22ae8f64ef092c to your computer and use it in GitHub Desktop.
Adding last login recording
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Extensions; | |
use SilverStripe\ORM\DataExtension; | |
use SilverStripe\Security\LoginAttempt; | |
/** | |
* | |
* @property LoginAttempt|LoginAttemptExtension $owner | |
*/ | |
class LoginAttemptExtension extends DataExtension | |
{ | |
private static $summary_fields = [ | |
'Email', | |
'Created', | |
'Status' | |
]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Extensions; | |
use SilverStripe\Security\LoginAttempt; | |
use SilverStripe\Security\Member; | |
/** | |
*/ | |
class MemberExtension extends DataExtension | |
{ | |
private static $has_many = [ | |
'LoginAttempts' => LoginAttempt::class, | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment