Tuesday, April 5, 2011

Re: please help me

1. I don't understand what do you mean by this:
"but because I happen to have my register and login forms on the same page".

2. just a guess. after saving the user get the last id and call login with User and not RegUser
 if ($this->RegUser->save($this->data)) {
                $regNewId = $this->RegUser->getLastInsertID();
                $logdetails = $this->User->read(null,$regNewId);
                $this->Auth->login($logdetails);
                .......
                .......

3. what this code for
if (!empty($this->data['RegUser']['password'])) {
                $logdetails = $this->RegUser->read();
                $this->data['RegUser']['password'] = $this->Auth->password($this->data['RegUser']['password']);
            }

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: