/** * Retrieve the forum contact information from and user business profile.<br> * Email, city, country, mobile, phone and website are taken from {@link * UserProfile#BUSINESE_INFO_KEYS}. */ public CommonContact getCommonContact(String userId) { CommonContact contact = new CommonContact(); try { UserProfile profile = orgService.getUserProfileHandler().findUserProfileByName(userId); contact.setAvatarUrl(profile.getAttribute("user.other-info.avatar.url")); contact.setBirthday(profile.getAttribute("user.bdate")); contact.setGender(profile.getAttribute("user.gender")); contact.setJob(profile.getAttribute("user.jobtitle")); contact.setEmailAddress(profile.getAttribute("user.business-info.online.email")); contact.setCity(profile.getAttribute("user.business-info.postal.city")); contact.setCountry(profile.getAttribute("user.business-info.postal.country")); contact.setHomePhone(profile.getAttribute("user.business-info.telecom.mobile.number")); contact.setWorkPhone(profile.getAttribute("user.business-info.telecom.telephone.number")); contact.setWebSite(profile.getAttribute("user.business-info.online.uri")); } catch (Exception e) { log.error("Could not retrieve forum user profile for " + userId + ": ", e); } return contact; }