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

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

Introduction

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

Prototype

public static boolean hasPasswordPolicyUser(long passwordPolicyId, long userId) 

Source Link

Document

Returns true if the password policy has been assigned to the user.

Usage

From source file:com.liferay.password.policies.admin.web.internal.search.AddUserPasswordPolicyChecker.java

License:Open Source License

@Override
public boolean isChecked(Object obj) {
    User user = (User) obj;/*  www  .j a  va 2s  .  co  m*/

    try {
        return UserLocalServiceUtil.hasPasswordPolicyUser(_passwordPolicy.getPasswordPolicyId(),
                user.getUserId());
    } catch (Exception e) {
        _log.error(e, e);

        return false;
    }
}