- This topic has 3 replies, 2 voices, and was last updated 10 years, 9 months ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP eMember › WP eMember General Questions › Serial Code after Registering with eMember
Tagged: serial code
Is it possible with the eMember plugin to issue someone a serial code simply after they register and login? I’m looking to issue all members that register a serial code.
1. What are your requirements for such a serial code?
2. Does it have to be unique to each member?
3. Does it have to be non-guessable by non-members?
4. Are you charging for memberships?
If the answer to the last 3 questions is “yes,” you could use the transaction ID from the payment gateway.
1. That it be unique and about 24 chars long numbers/letters.
2. Yes, it has to be unique because our system will look at it.
3. Yes, can’t be guessed.
4. No, they simply register, login and grab the code.
I had it working before with our products but now we’ve made it all free.
Well what you might do, is create a string from a combination of the member’s user name, and the member’s ID number. You’d then create an MD5 hash from that string using the md5() PHP function. You would then display that hash code, as part of the member’s profile.
Because the user name and member ID number are permanent, and since the member ID number is never disclosed; even to the member, the MD5 hash will be long and not guessable.
Also, to foil any attempts by persons reading this message, to reverse engineer the MD5 hash, you could add a “secret salt” character to the string.