Jump to content

Ideas not code


onlyican

Recommended Posts

Hey

I have created an affiliation script
The affiliates log in and can check how much money they made
The admin uses the email address provided on registration to pay them with paypal.

The affiliate logs in using there email address and password

NOW

I was thinking, what if the user needs to change the email address for some reason, as we are talking about money here, what is the best way to do this

One idea I had was to send an email to the affiliate to there OLD email address, to confirm the changes.
This way, if someone else did hack in and change the email address so they get paid, the other guy knows

Anyone got any better ideas?
Link to comment
Share on other sites

Yeah, I'd say so, send them an e-mail saying that someone has requested a change in e-mail, ask them to confirm by e-mailing you a code you sent to their old address, from their new adress.

eg company1@mail.com wants to change their address to company2@mail.com

email company1@mail.com with a code and an explanation of what has happened, ask them to e-mail you this code from company2@mail.com.

Just a suggestion.
Link to comment
Share on other sites

When someone want's to change his email, add to their row in the database, in the column email_change_code, a random md5 string for example- $rand_code=md5("abc".time().rand(1000,9999)."123"). Then, send to company1@mail.com a email with the following link:
www.domain.com/emailchange.php?code=$rand_code&id=$id ($id is the number that is set for the company in the table, in the auto increment field)

emailchange.php will check if the value in $_GET['code'] is the same as in the database in the row where it's id is $_GET['id']. If there's a match, continue and change the email :)

Orio.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.