manolo
|
| Posted: 08/04/2005, 11:28 PM |
|
How can I send a confirmation email to the user email when he register, with a link to "confirm" his email adress, like most sites do to be shure that the user email is real.
I just cant get the logic.....!
|
|
|
 |
Damian Hupfeld
|
| Posted: 08/09/2005, 5:42 AM |
|
Way to do this is....
1. add a field to the user table and store a timestamp eg 20050809145531256
(or get tricky and append or prepend their userid or date of birth or your
fav number or something else to make it harder again for someone to crack)
2. also need a level field (but you would already have this)
3. make email address their username and set it to a unique field
4. when the user registers store the timestamp and a user level of 1
(awaiting authorisation)
5. create a confiem.php page that displays the users name, email and a
hidden field and in the data source set timestamp=authlink of type URL
6. make it restricted (to level 1 or higher - if you use optional step below
it prevents banned users from reclicking on the link - you could also on
submit delete - or set a new - the timestamp field, this would mean that the
link wouldnt find the user - and Im sure there are many other ways)
7. add a hidden text field for level with a value of 2 (member - or guest if
using options below)
8. have labels for username and name and a confirm (update) button
9. in the register table add custom code in After Insert and send a link to
their email address telling them to click on the link
10. the link will be http://www.mywebsite.com/confirm.php?authlink={timestamp}
optional steps
10. send an email onclick on Confirm button to the site admin telling them
that {newuser} has confirmed their email and you could setup a similar page
to the confirm.php letting the admin upgrade the guest to a member (or
higher or even setting them to banned) using a listbox or radio buttons for
the different levels
11. send an email OnClick on Submit to user telling them that they have been
approved (or banned!)
Well thats one way!
regards
Damian Hupfeld http://www.nexthost.com.au/services.php
"manolo" <manolo@forum.codecharge> wrote in message
news:542f306fd3dff2@news.codecharge.com...
> How can I send a confirmation email to the user email when he register,
> with a
> link to "confirm" his email adress, like most sites do to be shure that
> the
> user email is real.
>
> I just cant get the logic.....!
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
|