Add author field to populateDefaults() so it is pre-populateed in CMS

This commit is contained in:
Morven 2012-07-02 12:47:34 +01:00
parent 31bd2e74d3
commit 6270a7a1c4
1 changed files with 3 additions and 0 deletions

View File

@ -47,6 +47,9 @@ class BlogEntry extends Page {
parent::populateDefaults();
$this->setField('Date', date('Y-m-d H:i:s', strtotime('now')));
if(Member::currentUser())
$this->setField('Author',Member::currentUser()->FirstName);
}
function getCMSFields() {