Created
August 30, 2013 22:53
-
-
Save jeremycaldwell/6395064 to your computer and use it in GitHub Desktop.
Drupal 7 - User picture
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ($picture): ?> | |
<?php | |
$user = user_load($user->uid); | |
print theme_image_style ( | |
array ( | |
'style_name' => 'user-photo', | |
'path' => $user->picture->uri, | |
'attributes' => array ('class' => 'user-photo'), | |
'width' => NULL, | |
'height' => NULL, | |
) | |
); | |
?> | |
<?php else: ?> | |
<div class="userimage-placeholder"></div> | |
<?php endif; ?> | |
OR | |
<?php print theme('user_picture', array('account' => $user)); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment