Example usage for com.liferay.portal.kernel.service UserLocalServiceUtil getUserById

List of usage examples for com.liferay.portal.kernel.service UserLocalServiceUtil getUserById

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.service UserLocalServiceUtil getUserById.

Prototype

public static com.liferay.portal.kernel.model.User getUserById(long companyId, long userId)
        throws com.liferay.portal.kernel.exception.PortalException 

Source Link

Document

Returns the user with the primary key from the company.

Usage

From source file:eu.gerhards.liferay.services.angular.service.impl.AngularUserServiceImpl.java

License:Open Source License

@Override
public User deleteUserById(long userId) throws PortalException {

    _log.info("Deleteing user by id ...");

    _log.debug("    ... security check ... ");

    PortalPermissionUtil.check(getPermissionChecker(), ActionKeys.DELETE_USER);

    _log.debug("    ... deleting ...");

    User user = getGuestOrUser();//  w ww.  j  a va2s  .  c  o  m
    User existingUser = UserLocalServiceUtil.getUserById(user.getCompanyId(), userId);

    return this.deleteUser(user, existingUser);
}