Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Get author server-side


Go to End


562 Views

Avatar
Vlad Belfort

Community Member, 55 Posts

3 August 2016 at 1:52am

In the front-end I am using this to get the name of authors.

 $allVersions.First.Author.Name || $allVersions.Last.Author.Name 

What about server-side? I tried things such as $this->Author and other variations but they don't return anything.

How would I do this server-side if I am trying to get the name of the person who first created an article and the name of the last person who has edited it?