Wouldn't it be much easier to have a users table, with a field such as
temp and make it booleanso you are either temp or not temp. It would
be much faster, and less pointless then keeping users separate.

On Apr 12, 9:03 am, brian <[email protected]> wrote:
> There shouldn't be any reason to associate TempUser & User. If your
> temp_users & users tables are the same, then you'd just move the row
> from one to the other. You can either do this in your UsersController:
>
> $uses = array('User', 'TempUser');
>
> ... or use ClassRegistry whenever you need to do something with
> TempUser if you don't want that model loaded all the time.
>
> As for moving the data between tables, you could do:
>
> $tmp_id = $this->data['TempUser']['id'];
> $this->data['User'] = $this->data['TempUser'];
> unset($this->data['TempUser']);
> $this->User->save($this->data);
> $this->TempUser->delete($tmp_id);
>
> On Sat, Apr 11, 2009 at 3:50 PM, loke <[email protected]> wrote:
>
> > Hi, I have a doubt in designing a model. I want to provide users the
> > ability to register but not have them in user table until they confirm
> > with a link sent to them with a random id after storing their
> > information in a tempUser table. Once they confirm their information
> > would be copied to users table from the tempUser table. What would be
> > the most straight forward way to go about it?
>
> > I have the user model defined, but am not able to define a
> > relationship between tempUser and User, as well decide on a model. I
> > believe there are more than one ways to go about it. I welcome any
> > suggestions you can provide.
>
> > Thanks
> > Loke
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to