1<?php
2
3/**
4 * @file
5 * Default theme implementation for displaying a users profile within a
6 * block. It only shows in relation to a node displayed as a full page.
7 *
8 * Available variables:
9 * - $user_picture: Image configured for the account linking to the users page.
10 * - $profile: Keyed array of all profile fields that have a value.
11 *
12 * Each $field in $profile contains:
13 * - $field->title: Title of the profile field.
14 * - $field->value: Value of the profile field.
15 * - $field->type: Type of the profile field, i.e., checkbox, textfield,
16 *   textarea, selection, list, url or date.
17 *
18 * Since $profile is keyed, a direct print of the field is possible. Not
19 * all accounts may have a value for a profile so do a check first. If a field
20 * of "last_name" was set for the site, the following can be used.
21 *
22 *  <?php if (isset($profile['last_name'])): ?>
23 *    <div class="field last-name">
24 *      <?php print $profile['last_name']->title; ?>:<br />
25 *      <?php print $profile['last_name']->value; ?>
26 *    </div>
27 *  <?php endif; ?>
28 *
29 * @see template_preprocess_profile_block()
30 */
31?>
32<?php print $user_picture; ?>
33
34<?php foreach ($profile as $field): ?>
35  <p>
36    <?php if ($field->type != 'checkbox'): ?>
37      <strong><?php print $field->title; ?></strong><br />
38    <?php endif; ?>
39    <?php print $field->value; ?>
40  </p>
41<?php endforeach; ?>
42