Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

FIX: Missing last login time (fixes 7666)

Add in missing user login time
  • Loading branch information...
commit ae52be54f01ae51c0ff4143a6a2b1535f58f6770 1 parent 023721a
@adrexia adrexia authored wilr committed
Showing with 7 additions and 5 deletions.
  1. +3 −2 forms/DatetimeField.php
  2. +4 −3 security/Member.php
View
5 forms/DatetimeField.php
@@ -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 @@ function Field($properties = array()) {
$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>";
View
7 security/Member.php
@@ -1143,8 +1143,9 @@ public function getCMSFields() {
$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 @@ public function getCMSFields() {
)
);
$timeFormatField->setValue($this->TimeFormat);
-
+
$this->extend('updateCMSFields', $fields);
return $fields;
Please sign in to comment.
Something went wrong with that request. Please try again.