Package org.apache.openmeetings.db.dao.user

Examples of org.apache.openmeetings.db.dao.user.UserDao


   * @param appLink
   * @return
   */
  private Long resetUser(String email, String username, String appLink) {
    try {
      UserDao userDao = getBean(UserDao.class);
      log.debug("resetUser " + email);

      // check if Mail given
      if (email.length() > 0) {
        // log.debug("getAdresses_id "+addr_e.getAdresses_id());
        User us = userDao.getUserByEmail(email);
        if (us != null) {
          sendHashByUser(us, appLink, userDao);
          return new Long(-4);
        } else {
          return new Long(-9);
        }
      } else if (username.length() > 0) {
        User us = userDao.getByName(username, User.Type.user);
        if (us != null) {
          sendHashByUser(us, appLink, userDao);
          return new Long(-4);
        } else {
          return new Long(-3);
View Full Code Here


            //Profiles
            File profiles = OmFileHelper.getUploadProfilesDir();
            long invalid = 0;
            long deleted = 0;
            ClassPathXmlApplicationContext ctx = getApplicationContext(ctxName);
            UserDao udao = ctx.getBean(UserDao.class);
            for (File profile : profiles.listFiles()) {
              long pSize = OmFileHelper.getSize(profile);
              long userId = getUserIdByProfile(profile.getName());
              User u = udao.get(userId);
              if (profile.isFile() || userId < 0 || u == null) {
                if (cleanup) {
                  FileHelper.removeRec(profile);
                } else {
                  invalid += pSize;
                }
              } else if (u.getDeleted()) {
                if (cleanup) {
                  FileHelper.removeRec(profile);
                } else {
                  deleted += pSize;
                }
              }
            }
            long missing = 0;
            for (User u : udao.getAllBackupUsers()) {
              if (!u.getDeleted() && u.getPictureuri() != null && !new File(OmFileHelper.getUploadProfilesUserDir(u.getUser_id()), u.getPictureuri()).exists()) {
                missing++;
              }
            }
            long size = OmFileHelper.getSize(profiles);
View Full Code Here

TOP

Related Classes of org.apache.openmeetings.db.dao.user.UserDao

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.