Echo of Page Owner on site

Permalink Browser Info Environment
I am trying to print the page owner name underneath the blog article but only get my own name back and not that from an other blogposter.

I' am using the following snippet:

<?php echo $c->getVersionObject()->getVersionAuthorUserName(); $userName ?>

Any help will be welcome.

Type: Discussion
Status: New
vincedelaking
View Replies: View Best Answer
cannonf700 replied on at Permalink Best Answer Reply
cannonf700
You almost have it. Use this:
<?php echo $c->getVersionObject()->getVersionAuthorUserName(); ?>

and that should do the trick.
vincedelaking replied on at Permalink Reply
vincedelaking
Thanks Ryan,
That make's sence :)
TheRealSean replied on at Permalink Reply
TheRealSean
I was attempting to get the page owner underneath my blog entry but post it as the page owner and not the current logged in user. As I was asked to post a blog entry as another user.

My immediate thought was to create an author page attribute but instead I am able to use the page owner to get the same result.

I used the following to achieve this. Ill post it here, as this was the best match to my problem when searching.

$ui = UserInfo::getByID($c->getCollectionUserID());
   $display_name = $ui->getAttribute('display_name'); //user attribute
becki91 replied on at Permalink Reply
becki91
Hi TheRealSean,

I'm looking for exactly the same solution that you were going for, as we are trying to display the page owner as the author within our blog. The trouble is: I don't get your solution to work. Where did you put the snippet you posted? Asked in another way: How does the complete implementation have to look like in order to work?

Regards
RadiantWeb replied on at Permalink Reply
RadiantWeb
I'm pretty sure PB defaults to the page owner if no author is present in the content view. so simply remove the author and it should display author info as the page owner.

Chad

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.