Package org.olat.registration

Examples of org.olat.registration.RegistrationManager


    Tracing.logAudit("Error authenticating user "+login+" via provider OLAT", OLATAuthenticationController.class);
    return null;
  }
 
  private static Identity findIdentInChangingEmailWorkflow(String login){
    RegistrationManager rm = RegistrationManager.getInstance();
    List<TemporaryKey> tk = rm.loadTemporaryKeyByAction(RegistrationManager.EMAIL_CHANGE);
    if (tk != null) {
      for (TemporaryKey temporaryKey : tk) {
        XStream xml = new XStream();
        HashMap<String, String> mails = (HashMap<String, String>) xml.fromXML(temporaryKey.getEmailAddress());
        if (login.equals(mails.get("changedEMail"))) {
View Full Code Here


        }
      }
     
      // special case for email field
      if (userPropertyHandler.getName().equals("email")) {
        RegistrationManager rm = RegistrationManager.getInstance();
        String key = this.identity.getUser().getProperty("emchangeKey", null);
        TemporaryKeyImpl tempKey = rm.loadTemporaryKeyByRegistrationKey(key);
        if (tempKey != null) {
          XStream xml = new XStream();
          HashMap<String, String> mails = (HashMap<String, String>) xml.fromXML(tempKey.getEmailAddress());
          formItem.setExampleKey("email.change.form.info", new String[] {mails.get("changedEMail")});
        }
View Full Code Here

  private void createDisclaimerConfirmationForExistingUsers(UpgradeManager upgradeManager) {
    UpgradeHistoryData uhd = upgradeManager.getUpgradesHistory(VERSION);
    if (!uhd.getBooleanDataValue(TASK_CREATE_DISCLAIMER_CONFIRMATION)) {
      // Get all system users
      Manager secMgr = ManagerFactory.getManager();
      RegistrationManager regMgr = RegistrationManager.getInstance();
      DB db = DBFactory.getInstance();
      // Get all users
      List<Identity> identities = secMgr.getVisibleIdentitiesByPowerSearch(null, null, false, null, null, null, null, null);
      // Remove the users that did already confirm the disclaimer
      List<Identity> confirmedIdentities = regMgr.getIdentitiesWithConfirmedDisclaimer();
      PersistenceHelper.removeObjectsFromList(identities, confirmedIdentities);
      // Set the disclaimer property for the remaining users
      for (int i = 0; i < identities.size(); i++) {
        Identity identity = identities.get(i);
        regMgr.setHasConfirmedDislaimer(identity);
        // write something to the console after each 100 user, this can take a
        // while with many users and it is handy to know that the system is
        // doing something
        if (i % 250 == 0) {
          log.audit("Busy creating disclaimer confirmation. Done with " + i + " of a total of " + identities.size() + " users. Please wait ...");
View Full Code Here

  }
 
 
  private boolean checkForScheduledAdressChange(String emailAddress) {
    // check if mail address scheduled to change
    RegistrationManager rm = RegistrationManager.getInstance();
    List<TemporaryKey> tk = rm.loadTemporaryKeyByAction(RegistrationManager.EMAIL_CHANGE);
    if (tk != null) {
      for (TemporaryKey temporaryKey : tk) {
        XStream xml = new XStream();
        HashMap<String, String> mails = (HashMap<String, String>) xml.fromXML(temporaryKey.getEmailAddress());
        if (emailAddress.equals(mails.get("changedEMail"))) {
View Full Code Here

TOP

Related Classes of org.olat.registration.RegistrationManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.