mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
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
Block a user