Liferay 7.3 restricting user creation based on email domain

Jamie Sammons, modified 4 Years ago. New Member Posts: 2 Join Date: 7/15/21 Recent Posts

Hi,

In liferay 7.3, if we want to restrict user creation based on email domain ex. Users with @gmail should not be created in portal, is this problem statement achieveable by any oob property. Currently in 7.0  we are using hooks to handle this part. But i am still looking for amy configuration, if available in 7.3

Thanks,

Jay

 

thumbnail
Olaf Kock, modified 4 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts

Workflow comes to my mind, where you can automate a step by checking for a user's email domain.

Alternatively a ServiceWrapper for UserLocalService that prevents the user from being created.

In both cases I'm not sure of the way the blocking is reported to the user - if you want to give them a proper human readable notification, you might need some extra UI work that detects these conditions and displays a proper error message.

Jamie Sammons, modified 4 Years ago. New Member Posts: 2 Join Date: 7/15/21 Recent Posts

Hi Olaf,

I tried service wrapper for solution an it worked. 

Thanks for helping.