• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

mail upon registration

 
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm developing a social networking portal using spring framework.

I have the following requirement.

A user who is willing to join this social networking portal will fill up a online form and clicks 'Submit' button. Upon clicking submit button, i need to send an email to the email id provided during registration with a link to visit. Once user sees the email, he visits the link provided and then user account is created with data provided during registration.

Now my problem is i'm unable to come with some web link that i can provide in the email upon registration.

How to form a link with user data provided in a portlet?

Where should i keep that registration data (in session or ???)

I'm not clear on how to implement this logic. Can anybody give me insight on how to implement the above mentioned logic?

Any help will be highly appreciated.

Thank you.
Edit/Delete Message
 
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am just throwing out the idea.

What you can do is have a table in the database that will hold the data the user entered in the form. So once the the user clicks the submit form, capture all the data in the table and use the generated key as an identifier.

Append the generated key as a request parameter (within the URL).. so when the user (at his/her own convenience) clicks on the link in the email, fetch all the previously stored data based on the id and proceed.

note:
-- You can come up with an encrypting logic to encrypt the identifier so that no user will play around with it.

does this make any sense?
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The approach is sound, but you absolutely, positively must encrypt the identifier. Or, even better, make it a hash of the ID and some lengthy "salt" string, which you then also store in the database. If the URL is then accessed you can extract that identifier and retrieve the record in the database that goes with it.

It's also common that the URL only has a limited validity (maybe 24 hours or so). After that, a new one must be generated.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic