I have a users controller using Auth.  I have a "add" function in the
user form which successfully adds users using Auth.

I need to be able to add a user from within a separate controller.
I.e., I have PaymentController which has function "AddPayment".  When
Payment info is submitted, it contains payment info and a new email
address and password.  I need to create a new user with this email and
password from within the PaymentController.

Something funny is going on.  This works fine:

     $this->data['User']['firstname'] = "Tom';
     $this->Payment->User->save($this->data);

This will create a new user with 'Tom' for the 'firstname' field.  The
SQL is an INSERT.

However, when I do:

     $this->data['User']['firstname'] = 'Tom';
     $this->data['User']['email'] = '[email protected]';
     $this->Payment->User->save($this->data);

The SQL generated here is: SELECT COUNT(*) AS `count` FROM `users` AS
`User` WHERE `User`.`email` = '[email protected]'

I'm sure there is a good reason it is doing a SELECT instead of an
INSERT when I try to insert an email address.

Any ideas how to remedy this?
--~--~---------~--~----~------------~-------~--~----~
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