Jump to:

23550 Posts in 19336 Topics by 2890 members

General Questions

SilverStripe Forums » General Questions » PasswordField Value Not Encrypted

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

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

Page: 1
Go to End
Author Topic: 1146 Views
  • TerryMiddleton
    Avatar
    Community Member
    108 Posts

    PasswordField Value Not Encrypted Link to this post

    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

  • Double-A-Ron
    Avatar
    Community Member
    604 Posts

    Re: PasswordField Value Not Encrypted Link to this post

    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

  • ajshort
    Avatar
    Community Member
    244 Posts

    Re: PasswordField Value Not Encrypted Link to this post

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

  • Double-A-Ron
    Avatar
    Community Member
    604 Posts

    Re: PasswordField Value Not Encrypted Link to this post

    Sounds like he wants both stored though.

    Cheers
    Aaron

  • TerryMiddleton
    Avatar
    Community Member
    108 Posts

    Re: PasswordField Value Not Encrypted Link to this post

    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

    1146 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.