Is there a way to display a none encrypted value in a passwordfield, but when the user types in the password it is encrypted?
I'm using the standard memberloginform.php
I can display the value, but it shows up as encrypted ********
Terry
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Is there a way to display a none encrypted value in a passwordfield, but when the user types in the password it is encrypted?
I'm using the standard memberloginform.php
I can display the value, but it shows up as encrypted ********
Terry
I'm sure you have a valid reason for wanting this, but I'm curious as to what it is.
The only way I can think you could do this is to extend the entire member so you have another column for storing a plain text version of the password.
Not a trivial thing, and not very secure of-course.
Cheers
Aaron
The field itself would be fairly easy to construct, but the password is stored in the database as a hash - meaning you can't access the original password (as Aaron mentioned).
However, you wouldn't need to extend the entire Member model. To disable password encryption, you can just call "Security::encrypt_passwords(false);", and then use some javascript or something to achieve what you're trying to do (I think).
Sounds like he wants both stored though.
Cheers
Aaron
Double-A-Ron & ajshort,
Thanks a million for the help.
What I was attempting to do is (maybe isn't industry standard) was to display for the login form the value of Enter Email and Enter Password in the respective fields
The password field shows the ***** but the email works.
I discovered after accomplishing this that what I was really after was when the user clicks on the field to enter their email that the Enter Email would disappear and the same for the Enter Password.
I'm thinking I'll have to attempt this with jquery or something...
Oh, I just want to store the email address and password and that's all.
Thanks for your help. I appreciate you both.
Terry