You are here

function imagecache_profiles_user_view_alter in ImageCache Profiles 7

Implements hook_user_view_alter().

Change the user profile picture to use the preferred image style.

File

./imagecache_profiles.module, line 171

Code

function imagecache_profiles_user_view_alter(&$build) {
  if (isset($build['user_picture']['#markup']) && ($style = variable_get('user_picture_style_profiles', ''))) {
    $picture = theme('user_picture', array(
      'account' => $build['#account'],
      'user_picture_style' => $style,
    ));
    $build['user_picture']['#markup'] = $picture;
  }
}