Beispiel #1
0
 public static String getUserAvatar(String userName) throws Exception {
   String url = "";
   try {
     FAQService service = getFAQService();
     FileAttachment avatar = service.getUserAvatar(userName);
     if (avatar != null) {
       url = CommonUtils.getImageUrl(avatar.getPath()) + "?size=" + avatar.getSize();
     }
   } catch (Exception e) {
     log.debug("Failed to get user avatar of user: " + userName, e);
   }
   return (isFieldEmpty(url)) ? org.exoplatform.faq.service.Utils.DEFAULT_AVATAR_URL : url;
 }