Created
March 29, 2018 23:25
-
-
Save ethanbustad/b6a92042b3b56f869dbd2501fc8a1b15 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.liferay.portal.kernel.service.PortletPreferencesLocalServiceUtil; | |
import com.liferay.portal.kernel.service.UserLocalServiceUtil; | |
screenName = "sir.testalot"; | |
try { | |
user = UserLocalServiceUtil.getUserByScreenName(10154, screenName); | |
// PortletKeys.PREFS_OWNER_TYPE_USER = 4 | |
portletPreferences = PortletPreferencesLocalServiceUtil.getPortletPreferences(user.getUserId(), 4, 0L, "com_liferay_osb_testray_issue_engine_jira_web_TestrayIssueEngineJIRAPortlet"); | |
PortletPreferencesLocalServiceUtil.deletePortletPreferences(portletPreferences); | |
} catch (Exception e) { | |
out.println("Update failed: " + e.toString()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment