mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Check that LastVisited field exists before making it readonly
This commit is contained in:
parent
e393a30d0f
commit
06e087d0f3
@ -1316,8 +1316,12 @@ class Member extends DataObject implements TemplateGlobalProvider {
|
||||
if( ! $self->config()->lock_out_after_incorrect_logins) {
|
||||
$mainFields->removeByName('FailedLoginCount');
|
||||
}
|
||||
|
||||
$mainFields->makeFieldReadonly('LastVisited');
|
||||
|
||||
// make sure that the "LastVisited" field exists
|
||||
// it may have been removed using $self->config()->hidden_fields
|
||||
if($mainFields->fieldByName("LastVisited")){
|
||||
$mainFields->makeFieldReadonly('LastVisited');
|
||||
}
|
||||
|
||||
$fields->removeByName('Subscriptions');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user