emailOnApproved plugin problem

By kovali - December 7, 2011

Hi, I am working on the Membership Plugin for my website right now, and I noticed that the password sent out with the Membership confirmation e-mail is not correct...

In fact I get this e-mail after regestering:

Hi kovali2,

Thanks for signing up to www.????.be.

Your username is: kovali2
Your password is: eb3bbc37936e78988

Please click here to login:
[url "http://www.????.be/user-login.php"]http://www.????.be/user-login.php[/#810081][/url]

Thanks!



And this e-mail after approval:

Welcome!

Your subscription has been processed successfully and you now have access to the Members Only area of our web site.

Your user name is: kovali2
and your temporary password is: $sha1$a1306d74208bddce433ed8c948dd20cee1074916

Once you have successfully logged in, you can change your password and update your profile information.

[url "http://www.your_website_url.com/user-login.php"]Click here to login[/#0000ff][/url]

Best,

The Subscription Committee



So the passwords in these 2 e-mail messages are different ?? I can only login with the first password, so the second one must be wrong ... Anyone ??

Thx,

Koen

Re: [kovali] emailOnApproved plugin problem

By Jason - December 7, 2011

Hi Koen,

The second password is actually an encrypted version of the first password. Once a password is encrypted and put in an account record, it can't be unencrypted, so there isn't a way to send the password in the second email (unless you kept a plain text copy of the password, but this would ruin the point of encrypting).

In the second email, you can tell them that their account has been approved and that they can now login using the password they originally got when registering. If they can't remember their password, you can direct them to the page where they can reset it.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] emailOnApproved plugin problem

By kovali - December 7, 2011

Hi Jason,

Thx for the reply, the idea is not to show the password in the first e-mail (only word of thanks for registering and some payment instructions) and send the 2nd e-mail with the password after membership payment has been received... There´s no way around this encrypted password in the 2nd mail ?

Koen

Re: [kovali] emailOnApproved plugin problem

By Jason - December 7, 2011

Hi Koen,

Okay, what you can do is first remove the password from your first email. Then, in your "emailOnApproved" funciton, you can create a new password, using the same code that creates the password when registering. You can then update their account record with the encrypted password and send the plain text version of their password to them in the email.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] emailOnApproved plugin problem

By kovali - December 7, 2011

Jason, is it possible to send the password in the 1st mail anyway while not allowing them to login as long as I don´t have them approved in admin? They would get a not approved yet message when trying to login... until they get approved.

I saw this function in the forum:"if ($CURRENT_USER['approved'])" but don´t know how or where to use it...

Re: [kovali] emailOnApproved plugin problem

By kovali - December 8, 2011

Hi Jason,

You said: Then, in your "emailOnApproved" funciton, you can create a new password, using the same code that creates the password when registering

Where can I find the "same code that creates the password" please ? Is it in user-new-signup.php please ?

Thx for your support.

Koen