Foren

RE: getPasswordUnencrypted() method is not working in custom portlet in L

thumbnail
David H Nebinger, geändert vor 7 Jahren.

RE: getPasswordUnencrypted() method is not working in custom portlet in L

Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
That is not a persisted field, it is not something that you can access at your own whim. That is used as a temporary value used during the user creation process.

In fact, the password is not encrypted, it is a one-way hash using secure algorithms. If I enter "password", it is hashed and that value is persisted. Hackers can not decrypt the hash back to "password", but at login if I enter "password" it is hashed and the hash value is compared to what is persisted. Since the hash algorithm should not create the same hash for the same password, authentication will pass if the stored hash value matches and that is typically a unique match.
thumbnail
Olaf Kock, geändert vor 7 Jahren.

RE: getPasswordUnencrypted() method is not working in custom portlet in L

Liferay Legend Beiträge: 6403 Beitrittsdatum: 23.09.08 Neueste Beiträge
lokesh gorrela:

Send Email:
EYCommunicationUtil.sendEmailForNewUser(resourceRequest,themeDisplay,company,currentGroup,user,user.getPasswordUnencrypted());


you might want to debug EYCommunicationUtil if it doesn't send out mail. As to how you get that password, you'll need to memorize it between creating your user account and sending that mail, instead of relying on that method call (as David mentioned)
thumbnail
Anil T, geändert vor 7 Jahren.

RE: getPasswordUnencrypted() method is not working in custom portlet in L

Expert Beiträge: 313 Beitrittsdatum: 14.01.12 Neueste Beiträge
This is good information for password hashing.