Foren

Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Antony S
Custom Login Portlet
21. Dezember 2012 08:59
Antwort

Antony S

Rang: New Member

Nachrichten: 3

Eintrittsdatum: 18. November 2012

Neue Beiträge

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. Dezember 2012 09:04
Antwort

David H Nebinger

Community Moderator

Rang: Liferay Legend

Nachrichten: 11788

Eintrittsdatum: 1. September 2006

Neue Beiträge

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. Dezember 2012 04:06
Antwort

Amit Doshi

Rang: Liferay Master

Nachrichten: 549

Eintrittsdatum: 29. Dezember 2010

Neue Beiträge

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