mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
FIX: Missing last login time (fixes 7666)
Add in missing user login time
This commit is contained in:
parent
023721aaca
commit
ae52be54f0
@ -290,6 +290,7 @@ class DatetimeField_Readonly extends DatetimeField {
|
||||
function Field($properties = array()) {
|
||||
$valDate = $this->dateField->dataValue();
|
||||
$valTime = $this->timeField->dataValue();
|
||||
|
||||
if($valDate && $valTime) {
|
||||
$format = sprintf(
|
||||
$this->getConfig('datetimeorder'),
|
||||
@ -302,9 +303,9 @@ class DatetimeField_Readonly extends DatetimeField {
|
||||
$this->dateField->getLocale()
|
||||
);
|
||||
$val = $valueObj->toString($format);
|
||||
|
||||
} else {
|
||||
// TODO Localization
|
||||
$val = '<i>(not set)</i>';
|
||||
$val = sprintf('<em>%s</em>', _t('DatetimeField.NOTSET', 'Not set'));
|
||||
}
|
||||
|
||||
return "<span class=\"readonly\" id=\"" . $this->id() . "\">$val</span>";
|
||||
|
@ -1143,8 +1143,9 @@ class Member extends DataObject implements TemplateGlobalProvider {
|
||||
|
||||
$mainFields->removeByName('Salt');
|
||||
$mainFields->removeByName('NumVisit');
|
||||
$mainFields->removeByName('LastVisited');
|
||||
|
||||
|
||||
$mainFields->makeFieldReadonly('LastVisited');
|
||||
|
||||
$fields->removeByName('Subscriptions');
|
||||
|
||||
// Groups relation will get us into logical conflicts because
|
||||
@ -1214,7 +1215,7 @@ class Member extends DataObject implements TemplateGlobalProvider {
|
||||
)
|
||||
);
|
||||
$timeFormatField->setValue($this->TimeFormat);
|
||||
|
||||
|
||||
$this->extend('updateCMSFields', $fields);
|
||||
|
||||
return $fields;
|
||||
|
Loading…
x
Reference in New Issue
Block a user