Necessary utility classes:
com.liferay.portal.util.PortalUtilGet current logged-in user:
PortalUtil.getUser(PortletRequest request);Avoid password reset on first login programmatically(can also be achieved by setting portal.properties [klick]):
user.setPasswordReset(false); UserLocalServiceUtil.updateUser(user);Avoid terms of use on first login programmatically(can also be achieved by setting portal.properties [klick]):
UserLocalServiceUtil.updateAgreedToTermsOfUse(User user, true);