Advertisement
Guest User

Untitled

a guest
Feb 18th, 2015
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. Original:
  2.  
  3. public static function getAvatarUrl(array $user, $size, $forceType = '')
  4. {
  5. if (!empty($user['user_id']) && $forceType != 'default')
  6. {
  7. if ($user['gravatar'] && $forceType != 'custom')
  8. {
  9. return self::_getGravatarUrl($user, $size);
  10. }
  11. else if (!empty($user['avatar_date']))
  12. {
  13. return self::_getCustomAvatarUrl($user, $size);
  14. }
  15. }
  16.  
  17. return self::_getDefaultAvatarUrl($user, $size);
  18. }
  19.  
  20. My function:
  21.  
  22. public static function getAvatarUrl(array $user, $size, $forceType = '')
  23. {
  24. return "http://pixelface.net/helm/{$user['username']}/".XenForo_Model_Avatar::getSizeFromCode($size);
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement