This is the link to the webpage that im working on...
http://warplayart.com/bleed_till_death/UserLoging/users
and this is the link that you register a user...
http://warplayart.com/bleed_till_death/UserLoging/users/register

But the form on the register page, calles add in for it's action
variable, even though im calling the register function from the url.
So i ended up using a wrapper like this which doesn't work.

What am i doing wrong?

+ when i was just using the add (http://warplayart.com/
bleed_till_death/UserLoging/users/add) and placed the code inside the
add function it worked fine.

---------------------------------------------------------------------------------
        function add()          {
                                $this->register($this->data);
          }

        function register($data = null)                 {

                  if (!empty($data))            {

                    $data['User']['password'] = md5($data['User']['password']);
                                $this->User->create();

                          if ($this->User->save($data)) {
                                   $this->Session->setFlash(__('User 
successfully registered',
true));
                                         $this->Session->write('User', $data);
                                         $this->redirect('index');
                                         exit();
                          }
                          else {
                                   $this->Session->setFlash(__('The Post could 
not be saved.
Please, try again.', true));
                          }
                  }
          }
--------------------------------------------------------------------------------------------


Thanks in advance.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to