How to display user attribute? (novice question, I know)

Permalink
I know how to display a custom attribute for a page. Now I am trying to figure out how to display a user attribute. More specifically, I want to use a page attribute to define which user's custom attributes are being displayed.

But first things first, I will be happy just to get any user attribute to show up on my site.

Here is a link to my attempt:http://advising.terry.uga.edu/index.php/accounting...

See the empty blocks in the #sidebar? That's my attempt to dynamically load the user attributes with PHP (I'm failing). Everywhere you see the word "Accounting" is the page attribute. I'd like to use that attribute to go grab a particular user's custom attributes (contact information) and display them on this page. The populated blocks below are just regular ol' content blocks, a visual representation of what I'm trying to accomplish.

Thanks for any helpful suggestions!

removemeplease
 
JohntheFish replied on at Permalink Reply
JohntheFish
This isn't a specific answer, but have you seen:

http://www.weblicating.com/doku/doku.php?id=cheatsheet/#.UPlp1h3Grn...
JohntheFish replied on at Permalink Reply
JohntheFish
The usual catch with user attributes is you need a userinfo object, not just a user object.

$ui = UserInfo::getByID($userID)
if (is_object($ui)){
  echo $ui->getAttribute($attr_handle);
}


See
http://www.concrete5.org/documentation/developers/permissions/users...
and (not quite what your problem is)
http://www.weblicating.com/doku/doku.php?id=cheatsheet/#get_a_user_...
removemeplease replied on at Permalink Reply
removemeplease
I love cheatsheets! Thanks and no, I had not seen this before.