Pull page owner info

Permalink
I basically want to print the user's info depending on who is the owner of the page,

what is the variable and syntax for seeing who the page's owner is and printing the info,

Thanks for your help!

Mike

Mnkras
 
okhayat replied on at Permalink Reply
okhayat
Where do you want to use/display this info? on the page itself or within a block?
Basically:
1. Lookup the userid related to the page Page::getCollectionUserID() or $c->getCollectionUserID() from within a block
2. Lookup the user info: UserInfo::getByID($id)
3. Get the info you need. Have a look at the UserInfo class here:http://docs.concrete5addons.com/...
Tony replied on at Permalink Reply
Tony
There's also a new block made specifically for displaying user info, avatar, & attributes, and yes, you can have it automatically print the owner of the page:

http://www.concrete5.org/marketplace/addons/user-info/...
Mnkras replied on at Permalink Reply
Mnkras
I want to go with Tony's solution (btw nice addon) but im kind of low on $$ so i guess i have to code it :)

Thanks
Tony replied on at Permalink Reply
Tony
since this seems like pretty core functionality and since it's easy to hardcode anyway, i just made the user-info add-on free. hopefully it'll save some people out there a bit of time. sorry if that change is a bit late for you mnkras
Mnkras replied on at Permalink Reply
Mnkras
Wow thanks! not late at all!
okhayat replied on at Permalink Reply
okhayat
Very kind of you, Tony!

Thanks!