public static Profile getCurrentProfile() { String profileId = session.get("profile.id"); Profile profile = Profile.findById(new Long(profileId)); return profile; }
public static void getPicture(long id) { Profile profile = Profile.findById(id); response.setContentTypeIfNotSet(profile.picture.type()); renderBinary(profile.picture.get()); }