Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Antony S
Custom Login Portlet
21 de diciembre de 2012 8:59
Respuesta

Antony S

Ranking: New Member

Mensajes: 3

Fecha de incorporación: 18 de noviembre de 2012

Mensajes recientes

Hi, I have created a portlet which take some inputs from user and send data on other server. Now I want to provide login option to user in same portlet. I mean there will be a check box and if user click on that check box, two input boxes will visible for email and password. I want to match email and password in my portlet but
I can't found any method in UserLocalService to retrieve user by email and password. I also tried to encrypt user's password but encrypt method in portal-impl emoticon


Thanks in advance.
David H Nebinger
RE: Custom Login Portlet
21 de diciembre de 2012 9:04
Respuesta

David H Nebinger

Community Moderator

Ranking: Liferay Legend

Mensajes: 11046

Fecha de incorporación: 1 de septiembre de 2006

Mensajes recientes

You should not validate email/password yourself.

Instead you should defer to the Liferay services to handle that.

Take a look at the default Liferay sign on portlet to see how to invoke Liferay to handle the login.
Amit Doshi
RE: Custom Login Portlet
26 de diciembre de 2012 4:06
Respuesta

Amit Doshi

Ranking: Liferay Master

Mensajes: 549

Fecha de incorporación: 29 de diciembre de 2010

Mensajes recientes

Dev J:
Hi, I have created a portlet which take some inputs from user and send data on other server. Now I want to provide login option to user in same portlet. I mean there will be a check box and if user click on that check box, two input boxes will visible for email and password. I want to match email and password in my portlet but
I can't found any method in UserLocalService to retrieve user by email and password. I also tried to encrypt user's password but encrypt method in portal-impl emoticon


Thanks in advance.

In order to authenticate refer the method UserLocalServiceUtil.authenticateForBasic(long companyId, java.lang.String authType, java.lang.String login, java.lang.String password)

Company id---> themeDisplay.getCompanyId().
authType----> emailAddress,userId,screenName (Use any one according to your requirement).
login- that you entered on the textbox
password- that you entered on the password textbox,

Hope it will be useful.

Thanks & Regards,
Amit Doshi