Thanks Armen,

Your register.ctp is missing the action parameter in the form->create
statement! Compare it with the login.ctp, where it is correctly
specified!

As soon as you specify the register action in the form->create
statement, it will invoke the register action in your controller!

Best wishes,
   John

On Aug 12, 9:54 am, armen <[email protected]> wrote:
> Sure, sorry I should've posted earlier.
>
> \view\users\index.ctp          =>http://www.warplayart.com/
> bleed_till_death/delete_when_done/index.ctp
> \view\users\login.ctp           =>http://www.warplayart.com/
> bleed_till_death/delete_when_done/login.ctp
> \view\users\register.ctp       =>http://www.warplayart.com/
> bleed_till_death/delete_when_done/register.ctp
> \controllers\users_controller.php       =>http://www.warplayart.com/
> bleed_till_death/delete_when_done/users_controller.tphp
>
> -Cheers,
> Armen
>
> On Aug 11, 10:58 pm, John Andersen <[email protected]> wrote:
>
> > Please show the code for the view in which you are creating the form
> > for the user to register him-/herself!
> > Enjoy,
> >    John
>
> > On Aug 12, 5:15 am, armen <[email protected]> wrote:
>
> > > It's not working really. I tried it again...
> > > if you click on the second link, where you register a username and
> > > password, then by clicking the submit button, you should be redirected
> > > to the index page without any problems since I'm creating a session
> > > and redirecting.
> > >      $this->Session->write('User', $data);
> > >      $this->redirect('index');
>
> > > Second the username and pass is not inserted in the database, so if
> > > you click on the first link to enter the username and password you
> > > just created, it won't let you login.
>
> > > -Armen
>
> > > On Aug 11, 12:43 am, anurag pal <[email protected]> wrote:
>
> > > > Hi,
>
> > > > I have checked the code its working properly.
>
> > > > Please cross check your method which checking for logged User. It
> > > > might be in beforeFilter because its asking for log-in.
>
> > > > Regards,
> > > > Anurag Pal
>
> > > > On Aug 11, 12:25 pm, armen <[email protected]> wrote:
>
> > > > > 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 [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