Saturday, August 17, 2013

How to delete an user in liferay 6.1.20 GA2 programmatically

private static void deleteUser(long userId) {
try {
UserLocalServiceUtil.deleteUser(userId);
} catch (PortalException e1) {
e1.printStackTrace();
} catch (SystemException e1) {
e1.printStackTrace();
}
}

1 comment:

  1. Is there any way to delete multiple table records. We are planning to create a page one click will clean up whole database.
    How to delete all record in USER table without passing argument. Similar to Delete From USER.
    Problem identified is relationship b/w tables.

    ReplyDelete