Sending users information when registering or changing password
I am in the process of testing the registration, login, user profile, change password and forgot password pages. The passwords are encrypted.
What I want to do is send the users an email with the unencrypted password and other registration information as reminders of login details.
a) when they register – (Company name, username, password etc.)
b) when they change their password – (username and password)
c) when they have forgotten their password – (username and password)
But I am having a really hard time understanding how to trigger the Security Assist Email Password before the form encrypts the password.
The forgotten password works fine. The email sends the unencrypted password.
However, on my change password page, all the information I want sent is being sent by email but the password is the encrypted version.
On the page, I have a recordset (rsCompanyInfo) of the users information filtered by the UserID session from the login page. This shows the correct info on the page ie: Welcome name, company etc.
I have also used the session to store the info I want sent in hidden fields in the form ie:
<input name="Firstname_usr" type="hidden" id="Firstname_usr" value="<?php echo $row_rsCompanyInfo['FirstName_usr']; ?>" />
And on the Message details of the Security Assist Email Password I have added the following:
User name: [Email_usr]<br />
Company: [Company]<br />
Name: [FirstName_usr] [LastName_usr]
I tried the password info like this:
Password from session: [Session.PasswordChange]<br />
Password: [Password_usr]<br />
to see what would happen. The second password returns the encrypted version, the first shows nothing.
I created a session (PasswordChange)
Trigger: If Session Variable Is Not Defined
Session Name: PasswordChange
Value: <?php echo ((isset($_POST["Password_usr"]))?$_POST["Password_usr"]:""); ?>
Now I realise the above is probably totally wrong. The trigger needs to be set to the form button, but what should the value be? And what fields should it be associated to in the update behaviour?
Do I even need a special session to trigger the email.
If anyone has created a successful registration or password update form that send the info to the user, can you PLEASE let me know how you did it.
Paul