/** * @see org.olat.login.auth.AuthenticationController#init(org.olat.core.gui.UserRequest, * org.olat.core.gui.control.WindowControl) */ public OLATAuthenticationController(UserRequest ureq, WindowControl winControl) { // use fallback translator to registration module super( ureq, winControl, Util.createPackageTranslator(RegistrationManager.class, ureq.getLocale())); loginComp = createVelocityContainer("olat_log", "olatlogin"); if (userModule.isAnyPasswordChangeAllowed()) { pwLink = LinkFactory.createLink("_olat_login_change_pwd", "menu.pw", loginComp, this); pwLink.setElementCssClass("o_login_pwd"); } if (registrationModule.isSelfRegistrationEnabled() && registrationModule.isSelfRegistrationLoginEnabled()) { registerLink = LinkFactory.createLink("_olat_login_register", "menu.register", loginComp, this); registerLink.setElementCssClass("o_login_register"); registerLink.setTitle("menu.register.alt"); } // prepare login form loginForm = new OLATAuthentcationForm(ureq, winControl, "olat_login", getTranslator()); listenTo(loginForm); loginComp.put("loginForm", loginForm.getInitialComponent()); // Check if form is triggered by external loginworkflow that has been failed if (ureq.getParameterSet().contains(PARAM_LOGINERROR)) { showError(translate("login.error", WebappHelper.getMailConfig("mailReplyTo"))); } putInitialPanel(loginComp); }
protected void openChangePassword(UserRequest ureq, String initialEmail) { // double-check if allowed first if (!userModule.isAnyPasswordChangeAllowed()) { throw new OLATSecurityException("chose password to be changed, but disallowed by config"); } removeAsListenerAndDispose(cmc); removeAsListenerAndDispose(subController); subController = new PwChangeController(ureq, getWindowControl(), initialEmail, true); listenTo(subController); String title = ((PwChangeController) subController).getWizardTitle(); cmc = new CloseableModalController( getWindowControl(), translate("close"), subController.getInitialComponent(), true, title); listenTo(cmc); cmc.activate(); }