So I have a site where there is a formal registration form, whereafter
the user gets logged in automatically via the Auth->login() method.
It stores data automatically from $this->data in the Session.

However, I have another part of the site that deals with new users
searching for something via an 'Items' Controller.  When they search
using a form, they also have to submit an 'email address', along with
what they're searching for.  What happens is, if the email doesn't
already exist in the DB, the 'email address' gets automatically
registered, and then the user is automatically logged in.  Here's how
I do

ItemsController extends AppController
{
        if (!$this->Item->User->is_user($this->data['User']['email']))
        {
              /* do various steps to put email in the  Users
tables ...generate random password, etc
                 After all that.... */

             $this->Auth->Login();
       }
}

Now my question, $this->data contains a) their search term, and b)
their email address.  When i do $this->Auth->login, will it still
automatically insert the appropriate data in the Session?  What about
the password, which I generate in the User model?  How do I manually
store that via $this->Auth->login()?

Thanks!

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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