API page: http://api.drupal.org/api/drupal/modules--user--user-profile.tpl.php
Describe the problem you have found:
How the author of the post is describing '$user->field_example' to use for raw data for user pages. This is wrong since $user variable in this instance will grab the data from the user that is currently logged in - instead of the user that is the owner of the profile page that is being viewed.
Comment | File | Size | Author |
---|---|---|---|
#2 | docFix-1278182-2.patch | 1.01 KB | cashwilliams |
Comments
Comment #1
jhodgdonThanks! You are right, $user is the global variable representing the logged-in user. The available variables section should be referring to $account to make it clear it is not the global $user.
Looks like a good issue for a novice docs contributor...
Comment #2
cashwilliams CreditAttribution: cashwilliams commentedpatch.
Seems strange though, that we call
render($user_profile)
rather thanrender($account_profile)
.Comment #3
jhodgdon$user is a Drupal-wide global variable for the logged-in user. $user_profile is a variable set up by the theme preprocessing functions.
Anyway, the patch looks good, thanks! (d7/8)
Comment #4
Dries CreditAttribution: Dries commentedCommitted to 7.x and 8.x. Thanks!