List of usage examples for com.liferay.portal.kernel.exception DuplicateOpenIdException DuplicateOpenIdException
public DuplicateOpenIdException(Throwable cause)
From source file:com.liferay.users.admin.web.internal.portlet.action.UpdateContactInformationMVCActionCommand.java
License:Open Source License
private void _validateOpenId(long companyId, long userId, String openId) throws Exception { if (Validator.isNull(openId)) { return;// ww w.ja v a 2s. c o m } User user = _userLocalService.fetchUserByOpenId(companyId, openId); if ((user != null) && (user.getUserId() != userId)) { throw new DuplicateOpenIdException("{userId=" + userId + "}"); } }