Reputation: 2757
Is it possible to deactivate users by default in liferay when they sign up so that the administrator could approve/activate their accounts later on.
Upvotes: 2
Views: 2552
Reputation: 262
Inside your ModelListener hook do this...
UserLocalServiceUtil.updateActive(userId, false);
Its really easy to write Hooks checkout Liferay documentation.
Upvotes: 1
Reputation: 48057
You can do this with a ModelListener for the User class - e.g. when a user is created first, your Listener should immediately set it to 'deactivated'.
You do this easiest in a custom hook that you'd have to write (see the linked wiki article). Hooks are quite easy to create with Liferay's plugin-sdk.
Upvotes: 1