Implementation Method:
Create an InviteUser_NewUser table. The structure is as follows:
Then follow my ideas:
After the user receives this link
="
Go to the website publicity page and use session or cookies to upload the userid
="
Click "register ".
="
Check whether the userid is the same as the userid of the current Month when the password is DateTime. Now. Month. If the password is different, it expires.
=>
Transfer the userid to the registration page (if it is not a cross-origin domain, simply say cookies)
="
Execute the registration process and insert data to the user table
="
In the same transaction, insert a record to the InviteUser_NewUser table. NewUserID is the currently registered user ID, and InviteID is sent through request. querystring (or recorded in cookies)
="
Complete Registration
="
The user enters the mailbox to activate
="
Execute Activation Process
="
Search for the user ID in InviteUser_NewUser. If yes, record the InviteUserID of the current record and update the user's points.