Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

PasswordField Value Not Encrypted


Go to End


5 Posts   1760 Views

Avatar
TerryMiddleton

Community Member, 108 Posts

2 May 2009 at 1:01am

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

Avatar
Double-A-Ron

Community Member, 607 Posts

4 May 2009 at 9:45am

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

Avatar
ajshort

Community Member, 244 Posts

4 May 2009 at 10:04am

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).

Avatar
Double-A-Ron

Community Member, 607 Posts

4 May 2009 at 10:11am

Sounds like he wants both stored though.

Cheers
Aaron

Avatar
TerryMiddleton

Community Member, 108 Posts

4 May 2009 at 12:10pm

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