RE: how to use custom fields to perform login in liferay?

Amos Fong, modified 6 Years ago. Junior Member Posts: 35 Join Date: 10/17/18 Recent Posts
Hi,


We have a new requirement in which we have to add couple of custom fields to user profile.

Like Phone numer, middle name, father name and grand father name along with emirates id.

We have to support the user login based on the email-id, emirates-id and phonenumber.

I have checked the liferay code and found that Authenticator class is used to perform pre and post login steps.

Please suggest me what will be the best approach to proceed with this requirement.

​​​​​​​

Thanks in advance
​​​​​​​-Amit
thumbnail
Christoph Rabel, modified 6 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts
The question is: What is you login process? Should users e.g. enter their phone number and password?

Generally speaking, you can implement your own authenticator:
https://dev.liferay.com/en/develop/tutorials/-/knowledge_base/7-0/password-based-authentication-pipelines

Also, you can hook the standard login jsp to add/change input fields there. You would create a fragment module and extend "com.liferay.login.web" and then select the jsps you want to change.

For some usecases, you would need to implement an autologin module.
https://dev.liferay.com/en/develop/tutorials/-/knowledge_base/7-0/auto-login
Amit Sharma, modified 6 Years ago. Junior Member Posts: 35 Join Date: 10/17/18 Recent Posts
Thanks Will implement this.