Scenario : I am trying to create custom log in functionality for liferay 6.1 In this, first I am asking email to user and I am checking, is this user is existing or new one. If it is existing then I will ask to fill password otherwise will ask him to create account. My problem is, How to compare user given password and password exist in DB. User given password is plain text and DB saved password is in encoded form. Any pointers on this will be helpful..Thanks in Advance.
Asked
Active
Viewed 187 times
0
-
1The question is a duplicate to http://stackoverflow.com/questions/33101594/compare-liferays-encrypted-passwords-and-user-input , but I've answered it nevertheless (as I cannot mark it as duplicate). – Tomas Pinos Mar 17 '16 at 07:43
1 Answers
1
There's a utility class for password comparison.
PasswordTrackerLocalServiceUtil#isSameAsCurrentPassword(userId, newClearTextPwd)

Tomas Pinos
- 2,812
- 14
- 22