Skip to content

Instantly share code, notes, and snippets.

@slemarchand
Created February 24, 2016 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slemarchand/ef492b4010ebcf744f2d to your computer and use it in GitHub Desktop.
Save slemarchand/ef492b4010ebcf744f2d to your computer and use it in GitHub Desktop.
import com.liferay.portal.service.*;
import com.liferay.portal.util.*;
try {
user = UserLocalServiceUtil.getUserByScreenName(PortalUtil.getCompany(actionRequest).getCompanyId(), "someScreenName");
UserLocalServiceUtil.deleteUser(user);
} catch(e) {
out.println("""<div class="portlet-msg-error">${e}</div>""")
e.printStackTrace(out)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment