Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: how to use custom fields to perform login in liferay?
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
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
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
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
Thanks Will implement this.