Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
User registration - Email verification using tokens
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
niki  
View profile  
 More options Apr 13, 3:43 pm
From: niki <ranga.nik...@gmail.com>
Date: Mon, 13 Apr 2009 12:43:28 -0700 (PDT)
Local: Mon, Apr 13 2009 3:43 pm
Subject: User registration - Email verification using tokens
hello

I have been trying out a way to send an email to the new user with a
token on a submitting the user registration form and finally saving
the user into the database when the token has been exicuted.

This is excatly like the bakery.cakephp.org user registration system.
So far the closest tutorial/code snippet I have found for the same is

http://edwardawebb.com/programming/php-programming/cakephp/reset-lost...

and a slightly outdated tutorial for the same in the bakery. I have
been trying to modify them for my needs but have been unsuccessful so
far. Any help or guidance with the same essp. in terms of tutorials or
a basic way to achieve the goal will be great help.

thanks


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Martin Westin  
View profile  
 More options Apr 14, 6:57 am
From: Martin Westin <martin.westin...@gmail.com>
Date: Tue, 14 Apr 2009 03:57:04 -0700 (PDT)
Local: Tues, Apr 14 2009 6:57 am
Subject: Re: User registration - Email verification using tokens

I use a similar method to Edward's (or so i imagine after a quick
glance).
I have the "ticketing" side of things put into a general-purpose
model:
http://bin.cakephp.org/saved/44956

In your case you would need the following logical steps. Where are you
getting into trouble?
- Display registration form
- Save new User with a flag to mark it as disabled. (any logins and
other features should require an enabled user)
- Create an activation ticket and send the url to the user's email.
- Accept activations where you verify the ticket (and delete it) and
enable the relevant user.

Using "my" Ticket model, I create a new ticket like this:
$ticket = $this->Ticket->setTicket($this->params['controller'],
$theUser['User']['email']);

Then I email this link:
$link = 'http://'.$_SERVER['SERVER_NAME'].'/'.$this->params
['controller'].'/activate/'.$ticket;

In the "activate" action I then fetch the ticket and enable the user.
function activate($hash = null) {
    $email = $this->Ticket->getTicket($this->params['controller'],
$hash)

...

    $authUser = $this->User->findByEmail($email);
    if ( is_array($authUser) ) {
        // enable the user here
    }else{
        // oups no user, better delete the ticket since this should
not be able to happen
        $this->Ticket->drop($hash);
    }

}

On Apr 13, 9:43 pm, niki <ranga.nik...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dr. Loboto  
View profile  
 More options Apr 15, 4:54 am
From: "Dr. Loboto" <drLob...@gmail.com>
Date: Wed, 15 Apr 2009 01:54:22 -0700 (PDT)
Local: Wed, Apr 15 2009 4:54 am
Subject: Re: User registration - Email verification using tokens

> $link = 'http://'.$_SERVER['SERVER_NAME'].'/'.$this->params
> ['controller'].'/activate/'.$ticket;

Standard way for absolute URLs:
$link = Router::url('/users/activate/'.$ticket, true);

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Martin Westin  
View profile  
 More options Apr 15, 5:20 am
From: Martin Westin <martin.westin...@gmail.com>
Date: Wed, 15 Apr 2009 02:20:28 -0700 (PDT)
Local: Wed, Apr 15 2009 5:20 am
Subject: Re: User registration - Email verification using tokens
Thanks for the tip. That line of code has probably been around since
early 2006 so it is a bit rough.

On Apr 15, 10:54 am, "Dr. Loboto" <drLob...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
niki  
View profile  
 More options Apr 15, 11:06 am
From: niki <ranga.nik...@gmail.com>
Date: Wed, 15 Apr 2009 08:06:14 -0700 (PDT)
Local: Wed, Apr 15 2009 11:06 am
Subject: Re: User registration - Email verification using tokens
hey people

thanks for dat inspirational help... will update u with its
progress... cheers

u made my day

On Apr 15, 2:20 pm, Martin Westin <martin.westin...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
niki  
View profile  
 More options May 7, 1:21 pm
From: niki <ranga.nik...@gmail.com>
Date: Thu, 7 May 2009 10:21:01 -0700 (PDT)
Local: Thurs, May 7 2009 1:21 pm
Subject: Re: User registration - Email verification using tokens
thanks for the help people.... I have written the code... chk out
http://www.nikatrex.com/blog/?p=300 cheers and thanks again

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google