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

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

Introduction

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

Prototype

public static boolean hasOrganizationUser(long organizationId, long userId) 

Source Link

Usage

From source file:com.liferay.users.admin.web.internal.search.AddUserOrganizationChecker.java

License:Open Source License

@Override
public boolean isChecked(Object obj) {
    User user = (User) obj;//from  ww w . j a v  a 2  s . c o m

    try {
        return UserLocalServiceUtil.hasOrganizationUser(_organization.getOrganizationId(), user.getUserId());
    } catch (Exception e) {
        _log.error(e, e);

        return false;
    }
}