if (getUser() == null) { setUser(new User());
if (getUserId() == null) { setUser(new User()); } else { User user = getCoreContext().loadUser(getUserId()); setUser(user);
    public void pageBeginRender(PageEvent event) {        if (getUser() == null) {            setUser(new User());        }                // If the user clicks through to the Extension Pools page, clicking OK or Cancel on that        // page should send the user back here        ICallback callback = new PageCallback(PAGE);        ExtensionPoolsPage poolsPage = (ExtensionPoolsPage) event.getRequestCycle().getPage(ExtensionPoolsPage.PAGE);        poolsPage.setCallback(callback);                // If no callback was set before navigating to this page, then by        // default, go back to the ManageUsers page        if (getCallback() == null) {            setCallback(new PageCallback(ManageUsers.PAGE));        }    }