Package com.liferay.portal

Examples of com.liferay.portal.NoSuchUserException


              }

              if ((user == null) || (!UtilMethods.isSet(user.getEmailAddress()))) {
              SecurityLogger.logInfo(LoginFactory.class,"An invalid attempt to login or no email set for " + userName + " from IP: " + request.getRemoteAddr());

                throw new NoSuchUserException();
              }

              if (user.isNew() ||
                  (!Config.getBooleanProperty("ALLOW_INACTIVE_ACCOUNTS_TO_LOGIN", false) && !user.isActive())) {
              SecurityLogger.logInfo(LoginFactory.class,"An invalid attempt to login to an inactive account as " + userName + " from IP: " + request.getRemoteAddr());
View Full Code Here


               }

               if ((user == null) || (!UtilMethods.isSet(user.getEmailAddress()))) {
           SecurityLogger.logInfo(LoginFactory.class,"An invalid attempt to login as " + userName + " has been made  - user cannot be found");

                 throw new NoSuchUserException();
               }

               if (user.isNew() ||
                   (!Config.getBooleanProperty("ALLOW_INACTIVE_ACCOUNTS_TO_LOGIN", false) && !user.isActive())) {
           SecurityLogger.logInfo(LoginFactory.class,"An invalid attempt to login as " + userName + " has been made  - user is marked inactive");
View Full Code Here

            } else {
              user = APILocator.getUserAPI().loadUserById(userName,APILocator.getUserAPI().getSystemUser(),false);
            }

            if ((user == null) || (!UtilMethods.isSet(user.getEmailAddress()))) {
              throw new NoSuchUserException();
            }

            if (!user.isActive()) {
        // re-sending activation account link
        request.setAttribute("userId", user.getUserId());
View Full Code Here

          } catch (DotDataException e) {
              // TODO Auto-generated catch block
              throw new SystemException("Cannot find System User");
          }
          if(systemUser.getUserId().equals(userId)){
              throw new NoSuchUserException(userId.toString());
          }
     
     
     
      UserHBM userHBM = (UserHBM)session.load(UserHBM.class, userId);
      com.liferay.portal.model.User user = UserHBMUtil.model(userHBM);
      session.delete(userHBM);
      session.flush();
      UserPool.remove(userId);

      return user;
    }
    catch (HibernateException he) {
      if (he instanceof ObjectNotFoundException) {
        throw new NoSuchUserException(userId.toString());
      }
      else {
        throw new SystemException(he);
      }
    }
View Full Code Here

      return user;
    }
    catch (HibernateException he) {
      if (he instanceof ObjectNotFoundException) {
        throw new NoSuchUserException(userId.toString());
      }
      else {
        throw new SystemException(he);
      }
    }
View Full Code Here

    String companyId, OrderByComparator obc)
    throws NoSuchUserException, SystemException {
    List list = findByCompanyId(companyId, 0, 1, obc);

    if (list.size() == 0) {
      throw new NoSuchUserException();
    }
    else {
      return (com.liferay.portal.model.User)list.get(0);
    }
  }
View Full Code Here

    throws NoSuchUserException, SystemException {
    int count = countByCompanyId(companyId);
    List list = findByCompanyId(companyId, count - 1, count, obc);

    if (list.size() == 0) {
      throw new NoSuchUserException();
    }
    else {
      return (com.liferay.portal.model.User)list.get(0);
    }
  }
View Full Code Here

      return UserHBMUtil.model(userHBM);
    }
    catch (HibernateException he) {
      if (he instanceof ObjectNotFoundException) {
        throw new NoSuchUserException();
      }
      else {
        throw new SystemException(he);
      }
    }
View Full Code Here

    String password, OrderByComparator obc)
    throws NoSuchUserException, SystemException {
    List list = findByC_P(companyId, password, 0, 1, obc);

    if (list.size() == 0) {
      throw new NoSuchUserException();
    }
    else {
      return (com.liferay.portal.model.User)list.get(0);
    }
  }
View Full Code Here

    throws NoSuchUserException, SystemException {
    int count = countByC_P(companyId, password);
    List list = findByC_P(companyId, password, count - 1, count, obc);

    if (list.size() == 0) {
      throw new NoSuchUserException();
    }
    else {
      return (com.liferay.portal.model.User)list.get(0);
    }
  }
View Full Code Here

TOP

Related Classes of com.liferay.portal.NoSuchUserException

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.