Hello Guys
Here, I am writing blog for deleting user by userId in liferay from custom portlet.
User : The extended model interface for the User service. Represents a row in the "User_" database
table, with each column mapped to a property of this class.
Follow the below steps to delete user :
Step 1 : Delete user by userId
UserLocalServiceUtil.deleteUser(userId);
Step 2 : Delete user by User instance
User user = UserLocalServiceUtil.getUser(userId);
UserLocalServiceUtil.deleteUser(user);
0 Comment(s)