22981 Posts in 11762 Topics by 2827 members
|Go to End|
16 May 2009 at 3:32am
I need to send the user their login infomation (email, password)
When I do this their password is encrypted.
How can I decrypt so they can see their password?
16 May 2009 at 10:56am Last edited: 16 May 2009 10:57am
You cannot decrypt passwords, thats kinda the point of Encryption!
Depending on how you are doing this (eg is it straight after signup) you can keep there password clear - for example a client of mine wanted to email confirmation of the password to the user on signup so I did something like
// this is in the form submission method, $data is the passed values
$Member->Password = $data['Password']; // $Password will be encrypted
$Member->ClearPassword = $data['Password']; // $ClearPassword is NOT in the database but is saved temporary to this object
$email = new MemberSignupEmail(); // my own custom class
$email->populateTemplate($Member); // $ClearPassword is available in the email template but not stored in the DB
In other cases you cannot get the Password. You must reset it.
16 May 2009 at 11:18am
Thanks for reply.
This client has a process where they have to approve the user before they can gain access to the site. So I the user fill out a form and I email the results to company rep who will decide to approve/deny them based on if they are a paying customer. Once they approve them, they will get an email confirmation saying they have been approved and here is their login information.
hmmm...I wonder if I need to add a text field to the member and spoof it as a password field.
Is there a way to turn off encryption?
16 May 2009 at 2:53pm
When the user first signs up, flag them as unapproved, then add a process where the rep recieves the notification and can approve them (or not). Add a check for this flag on the appropriate pages and you've got your approval system in place without the need to email clear text passwords around.
29 January 2010 at 1:53am
How must be email template for using populateData?
29 January 2010 at 7:06am
I created a User Registration and Approval system using the DataObjectManager, When a user applies it saves the application to DataObject containing the same fields as the member field and sends a copy to an admin. I then add added a custom function to the DOM that approves the user, sends out an approval email and copies the data object to correct Member Group. So far its been effective.
|Go to Top|