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

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


        });
      }
     
      @Override
      protected void onValidate() {
        AdminUserDao dao = getBean(AdminUserDao.class);
        String n = nameField.getConvertedInput();
        if (n != null) {
          if (type == Type.email && null == dao.getUserByEmail(n)) {
            error(WebSession.getString(318));
          }
          if (type == Type.login && null == dao.getUserByName(n)) {
            error(WebSession.getString(320));
          }
        }
      }
    });
View Full Code Here


   * @param appLink
   * @return
   */
  private Long resetUser(String email, String username, String appLink) {
    try {
      AdminUserDao userDao = getBean(AdminUserDao.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.getUserByName(username);
        if (us != null) {
          sendHashByUser(us, appLink, userDao);
          return new Long(-4);
        } else {
          return new Long(-3);
View Full Code Here

      SessiondataDao sessionDao = getBean(SessiondataDao.class);
      Sessiondata sd = sessionDao.getSessionByHash(soapLogin.getSessionHash());
      if (sd != null && sd.getSessionXml() != null) {
        RemoteSessionObject remoteUser = RemoteSessionObject.fromXml(sd.getSessionXml());
        if (remoteUser != null && !Strings.isEmpty(remoteUser.getExternalUserId())) {
          AdminUserDao userDao = getBean(AdminUserDao.class);
          User user = userDao.getExternalUser(remoteUser.getExternalUserId(), remoteUser.getExternalUserType());
          if (user == null) {
            user = userDao.getNewUserInstance(null);
            user.setFirstname(remoteUser.getFirstname());
            user.setLastname(remoteUser.getLastname());
            user.setLogin(remoteUser.getUsername()); //FIXME check if login UNIQUE
            user.setExternalUserId(remoteUser.getExternalUserId());
            user.setExternalUserType(remoteUser.getExternalUserType());
            user.getAdresses().setEmail(remoteUser.getEmail());
            user.setPictureuri(remoteUser.getPictureUrl());
          } else {
            user.setFirstname(remoteUser.getFirstname());
            user.setLastname(remoteUser.getLastname());
            user.setPictureuri(remoteUser.getPictureUrl());
          }
          user = userDao.update(user, null);

          soapLogin.setUsed(true);
          soapLogin.setUseDate(new Date());
          //soapLogin.setClientURL(clientURL); //FIXME
          soapDao.update(soapLogin);
View Full Code Here

        , new OmOrderByBorder<User>("orderByFirstName", "firstname", container)
        , new OmOrderByBorder<User>("orderByLastName", "lastname", container));
    add(container.orderLinks);
    add(navigator);

    AdminUserDao usersDaoImpl = getBean(AdminUserDao.class);
    form = new UserForm("form", listContainer, usersDaoImpl.getNewUserInstance(usersDaoImpl.get(getUserId())), warning);
    form.showNewRecord();
    add(form, warning);
  }
View Full Code Here

TOP

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

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.