List of usage examples for com.liferay.portal.kernel.service UserLocalServiceUtil getUserById
public static com.liferay.portal.kernel.model.User getUserById(long userId) throws com.liferay.portal.kernel.exception.PortalException
From source file:at.graz.meduni.bibbox.liferay.portlet.model.ApplicationInstanceClp.java
License:Open Source License
@Override public String getUserUuid() { try {// ww w . j a va2 s .c o m User user = UserLocalServiceUtil.getUserById(getUserId()); return user.getUuid(); } catch (PortalException pe) { return StringPool.BLANK; } }
From source file:blade.authfailure.LogAuthFailure.java
License:Apache License
@Override public void onFailureByUserId(long companyId, long userId, Map<String, String[]> headerMap, Map<String, String[]> parameterMap) throws AuthException { try {/*from w w w.j a va 2 s .c o m*/ User user = UserLocalServiceUtil.getUserById(userId); int failures = user.getFailedLoginAttempts(); _log.info("onFailureByUserId: userId " + userId + " has failed to login " + failures + " times"); } catch (PortalException e) { } }
From source file:blade.authfailure.LogMaxFailures.java
License:Apache License
@Override public void onFailureByUserId(long companyId, long userId, Map<String, String[]> headerMap, Map<String, String[]> parameterMap) throws AuthException { try {/*from w w w. j a v a 2s .com*/ User user = UserLocalServiceUtil.getUserById(userId); boolean lockout = user.isLockout(); _log.info("onFailureById: userId " + userId + " is " + (lockout ? "" : "not") + " locked out."); } catch (PortalException e) { } }
From source file:ca.efendi.datafeeds.model.impl.CJProductModelImpl.java
License:Open Source License
@Override public String getStatusByUserUuid() { try {// w ww.j av a 2 s.co m User user = UserLocalServiceUtil.getUserById(getStatusByUserId()); return user.getUuid(); } catch (PortalException pe) { return StringPool.BLANK; } }
From source file:com.bemis.portal.twofa.device.manager.model.impl.DeviceCodeModelImpl.java
License:Open Source License
@Override public String getPortalUserUuid() { try {//from w w w .jav a 2s .c o m User user = UserLocalServiceUtil.getUserById(getPortalUserId()); return user.getUuid(); } catch (PortalException pe) { return StringPool.BLANK; } }
From source file:com.liferay.asset.category.property.model.impl.AssetCategoryPropertyModelImpl.java
License:Open Source License
@Override public String getUserUuid() { try {/*from w w w .j ava 2 s . c o m*/ User user = UserLocalServiceUtil.getUserById(getUserId()); return user.getUuid(); } catch (PortalException pe) { return ""; } }
From source file:com.liferay.blade.samples.authfailure.LogAuthFailure.java
License:Apache License
@Override public void onFailureByUserId(long companyId, long userId, Map<String, String[]> headerMap, Map<String, String[]> parameterMap) throws AuthException { try {/*from w w w . j a va 2 s .co m*/ User user = UserLocalServiceUtil.getUserById(userId); int failures = user.getFailedLoginAttempts(); if (_log.isInfoEnabled()) { _log.info("onFailureByUserId: userId " + userId + " has failed to login " + failures + " times"); } } catch (PortalException pe) { } }
From source file:com.liferay.blade.samples.authfailure.LogMaxFailures.java
License:Apache License
@Override public void onFailureByUserId(long companyId, long userId, Map<String, String[]> headerMap, Map<String, String[]> parameterMap) throws AuthException { try {//from ww w . j a v a2 s . c om User user = UserLocalServiceUtil.getUserById(userId); boolean lockout = user.isLockout(); _log.info("onFailureById: userId " + userId + " is " + (lockout ? "" : "not") + " locked out."); } catch (PortalException pe) { } }
From source file:com.liferay.blogs.model.impl.BlogsEntryModelImpl.java
License:Open Source License
@Override public String getStatusByUserUuid() { try {/*from w w w. j a v a 2 s. c o m*/ User user = UserLocalServiceUtil.getUserById(getStatusByUserId()); return user.getUuid(); } catch (PortalException pe) { return ""; } }
From source file:com.liferay.blogs.model.impl.BlogsStatsUserModelImpl.java
License:Open Source License
@Override public String getStatsUserUuid() { try {//from w ww . ja va 2 s .c o m User user = UserLocalServiceUtil.getUserById(getStatsUserId()); return user.getUuid(); } catch (PortalException pe) { return ""; } }