Add author field to populateDefaults() so it is pre-populateed in CMS
This commit is contained in:
parent
31bd2e74d3
commit
6270a7a1c4
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue