And then you will be very, very, very secure ;-)

On Jan 6, 6:34 am, mark_story <[email protected]> wrote:
> Don't allow('login') you will never be able to login, just like the
> docs say.
>
> -Mark
>
> On Jan 5, 4:15 pm, Darren884 <[email protected]> wrote:
>
> > Hi I am trying to return a rendered element so I have to customize the
> > login() function on the controller I am using, however its not running
> > the query right even though the fields it is supposed to process are
> > defined in the model.
>
> > Here is the beforeRender code:
> > PHP Code:
>
> >     function beforeFilter() {
>
> >         $this->Auth->loginAction = array(
>
> >             'controller' => 'users',
>
> >             'action' => 'login_form'
>
> >         );
>
> >         $this->Auth->allow(array(
>
> >             'login_form',
>
> >             'login',
>
> >             'logout'
>
> >         ));
>
> >         $this->Auth->redirectLogin = array(
>
> >             'controller' => 'users',
>
> >             'action' => 'index'
>
> >         );
>
> >     }
>
> > Here is my login function:
> > PHP Code:
>
> >     function login() {
>
> >         $this->layout = null;
>
> >         if ($this->Auth->login($this->data['User'])) {
>
> >             $this->render('login_success', 'ajax');
>
> >         } else {
>
> >             $this->render('login_failure', 'ajax');
>
> >         }
>
> >     }
>
> > The data in the form is named as
> > data['User']['username'] and data['User']['password']
>
> > Does anyone know why the login function won't correctly process this?
> > Thanks
>
>
--~--~---------~--~----~------------~-------~--~----~
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