Examples of loadUserById()


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

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

    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

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

    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

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

    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

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

    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

Examples of com.dotmarketing.business.web.UserWebAPI.loadUserById()

   
    List<Map<String, Object>> resultList = new LinkedList<Map<String,Object>>();
    List<FieldVariable> fieldVars = fieldAPI.getFieldVariablesForField(fieldId, user, respectFrontendRoles);
    for(FieldVariable variable : fieldVars) {
      Map<String, Object> variableMap = variable.getMap();
      User variableLastModifier = userWebAPI.loadUserById(variable.getLastModifierId(), userWebAPI.getSystemUser(), false);
      String lastModifierFullName = "Unknown";
      if(variableLastModifier != null)
        lastModifierFullName = variableLastModifier.getFullName();
      variableMap.put("lastModifierFullName", lastModifierFullName);
      resultList.add(variableMap);
View Full Code Here

Examples of com.dotmarketing.business.web.UserWebAPI.loadUserById()

   
    List<Map<String, Object>> resultList = new LinkedList<Map<String,Object>>();
    List<HostVariable> hvars = hostVariableAPI.getVariablesForHost(hostId, user, respectFrontendRoles);
    for(HostVariable variable : hvars) {
      Map<String, Object> variableMap = variable.getMap();
      User variableLastModifier = userWebAPI.loadUserById(variable.getLastModifierId(), userWebAPI.getSystemUser(), false);
      String lastModifierFullName = "Unknown";
      if(variableLastModifier != null)
        lastModifierFullName = variableLastModifier.getFullName();
      variableMap.put("lastModifierFullName", lastModifierFullName);
      resultList.add(variableMap);
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.