Send email out with customer ID encripted

Posted on 2009-02-11
Last Modified: 2012-05-06
Hello there,
I am working on a site, I want to let existing customer request a online login id to sign in later.
After they sign in, I will send out a email with a link that after click will enable the account automatically.
On that link I am thinking to place the encripted customerID, so when coming back I can decript it and enable the account in DB.
How can I do the encript for a customerID? and after they reply, how can I decript the customerID from the QueryString?
Question by:tomcattyy
    LVL 10

    Accepted Solution

    Do you want to create a "confirm registration process"???

    If it's what you are looking for i will suggest you that.

    1) When the user register keep a "uniqueidentifer id" (Guid) in your database
         PK_MySiteMembers (int)
         UniqueMemberId (uniqueidentifier), Guid

    2) Instead of send this kind of confirmation email (because it's easily hackable cause the user just have to change a int number)
        Use the UniqueMemberId like this. 

    Then from the confirmation page you can retreive your uniquemember from the guid and update member info.

    The unique member id will identifier your user throw your database. Guid are unique, so it's a good way yo use when you want to have this kind of non hackable id.
    Hope this help.
    LVL 1

    Author Comment

    I think that's the right way,  Thanks a lot.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    AJAX ModalPopupExtender has a required property "TargetControlID" which may seem to be very confusing to new users. It means the server control that will be extended by the ModalPopup, for instance, if when you click a button, a ModalPopup displays,…
    In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now