Search in sources :

Example 1 with PwChangeController

use of org.olat.registration.PwChangeController in project OpenOLAT by OpenOLAT.

the class OLATAuthenticationController method openChangePassword.

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();
}
Also used : PwChangeController(org.olat.registration.PwChangeController) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) OLATSecurityException(org.olat.core.logging.OLATSecurityException)

Example 2 with PwChangeController

use of org.olat.registration.PwChangeController in project openolat by klemens.

the class OLATAuthenticationController method openChangePassword.

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();
}
Also used : PwChangeController(org.olat.registration.PwChangeController) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) OLATSecurityException(org.olat.core.logging.OLATSecurityException)

Example 3 with PwChangeController

use of org.olat.registration.PwChangeController in project openolat by klemens.

the class LDAPAuthenticationController method openChangePassword.

protected void openChangePassword(UserRequest ureq, String initialEmail) {
    // double-check if allowed first
    if (!userModule.isAnyPasswordChangeAllowed() || !ldapLoginModule.isPropagatePasswordChangedOnLdapServer()) {
        showError("error.password.change.not.allow");
    } else {
        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();
    }
}
Also used : PwChangeController(org.olat.registration.PwChangeController) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)

Example 4 with PwChangeController

use of org.olat.registration.PwChangeController in project OpenOLAT by OpenOLAT.

the class LDAPAuthenticationController method openChangePassword.

protected void openChangePassword(UserRequest ureq, String initialEmail) {
    // double-check if allowed first
    if (!userModule.isAnyPasswordChangeAllowed() || !ldapLoginModule.isPropagatePasswordChangedOnLdapServer()) {
        showError("error.password.change.not.allow");
    } else {
        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();
    }
}
Also used : PwChangeController(org.olat.registration.PwChangeController) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)

Aggregations

CloseableModalController (org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)4 PwChangeController (org.olat.registration.PwChangeController)4 OLATSecurityException (org.olat.core.logging.OLATSecurityException)2