public HomePageDisplayController(UserRequest ureq, WindowControl wControl, HomePageConfig hpc) {
super(ureq, wControl);
// use property handler translator for translating of user fields
setTranslator(UserManager.getInstance().getPropertyHandlerTranslator(getTranslator()));
VelocityContainer myContent = createVelocityContainer("homepagedisplay");
String userName = hpc.getUserName();
UserManager um = UserManager.getInstance();
Identity identity = ManagerFactory.getManager().findIdentityByName(userName);
User u = identity.getUser();
myContent.contextPut("userName", identity.getName());
myContent.contextPut("deleted", identity.getStatus().equals(Identity.STATUS_DELETED));
myContent.contextPut("user", u);
myContent.contextPut("locale", getLocale());
// add configured property handlers and the homepage config
// do the looping in the velocity context
List<UserPropertyHandler> userPropertyHandlers = um.getUserPropertyHandlersFor(usageIdentifyer, false);
myContent.contextPut("userPropertyHandlers", userPropertyHandlers);
myContent.contextPut("homepageConfig", hpc);
Controller dpc = new DisplayPortraitController(ureq, getWindowControl(), identity, true, false);
listenTo(dpc); // auto dispose
myContent.put("image", dpc.getInitialComponent());
putInitialPanel(myContent);
}