Package com.dotmarketing.business

Examples of com.dotmarketing.business.UserAPI.loadUserById()


      UserAPI uAPI = APILocator.getUserAPI();

      User user;
      try {
        HibernateUtil.startTransaction();
        user = uAPI.loadUserById(userId,uWebAPI.getLoggedInUser(request),false);
        APILocator.getContentletAPI().removeUserReferences(userId);
        uAPI.delete(user, uWebAPI.getLoggedInUser(request), !uWebAPI.isLoggedToBackend(request));
        HibernateUtil.commitTransaction();
      } catch (Exception e) {
        HibernateUtil.rollbackTransaction();
View Full Code Here


    HttpServletRequest request = ctx.getHttpServletRequest();
    UserAPI uAPI = APILocator.getUserAPI();

    List<com.dotmarketing.business.Role> userRoles = roleAPI.loadRolesForUser(userId);

    User user = uAPI.loadUserById(userId,uWebAPI.getLoggedInUser(request),false);

    //Remove all roles not assigned
    for(com.dotmarketing.business.Role r : userRoles) {
      if(!roleIds.contains(r.getId())) {
        if(r.isEditUsers()) {
View Full Code Here

    User user = null;
    List<Address> userAddresses = new ArrayList<Address>();
    try {
      if(UtilMethods.isSet(userId)){
        user = uAPI.loadUserById(userId, uWebAPI.getLoggedInUser(request), !uWebAPI.isLoggedToBackend(request));
        userAddresses = uAPI.loadUserAddresses(user, uWebAPI.getLoggedInUser(request), !uWebAPI.isLoggedToBackend(request));
      }
    } catch (NoSuchUserException e) {
      Logger.error(this, e.getMessage(), e);
      throw new DotDataException(e.getMessage(), e);
View Full Code Here

    WebContext ctx = WebContextFactory.get();
    HttpServletRequest request = ctx.getHttpServletRequest();

    User user = null;
    try {
      user = uAPI.loadUserById(userId, uWebAPI.getLoggedInUser(request), !uWebAPI.isLoggedToBackend(request));
    } catch (NoSuchUserException e) {
      Logger.error(this, e.getMessage(), e);
      throw new DotDataException(e.getMessage(), e);
    } catch (DotRuntimeException e) {
      Logger.error(this, e.getMessage(), e);
View Full Code Here

    WebContext ctx = WebContextFactory.get();
    HttpServletRequest request = ctx.getHttpServletRequest();

    User user = null;
    try {
      user = uAPI.loadUserById(userId, uWebAPI.getLoggedInUser(request), !uWebAPI.isLoggedToBackend(request));
    } catch (NoSuchUserException e) {
      Logger.error(this, e.getMessage(), e);
      throw new DotDataException(e.getMessage(), e);
    } catch (DotRuntimeException e) {
      Logger.error(this, e.getMessage(), e);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.