this is in my Userscontroller im using ad7six's mi-base
function beforeFilter() {
                parent::beforeFilter();
                if (Configure::read()) {
                        $this->Auth->allow('admin_init_acl');
                }
                $this->set('authFields', $this->Auth->fields);
                $this->Auth->allow('switch_language', 'register',
'forgotten_password', 'new_password', 'logout', 'back');
                if ($this->RequestHandler->isAjax()) {
                        $this->Auth->autoRedirect = false;
                }
                $this->Auth->userScope = array('User.email_token' =>
null);
                $this->Security->blackHoleCallback = '_blackHole';
        }



function login() {
                if (!$this->Auth->user() && Configure::read()) {
                        $this->Session->setFlash('Debug only message: Save some 
tedium -
check remember me.');
                }
                if ($this->RequestHandler->isAjax()) {
                        if (!$this->Auth->user()) {
                                $this->render('/elements/login');
                        } else {
                                $this->render('/elements/context');
                        }
                }
        $this->set('allowRegistrations', $this->settings
['allowRegistrations']);
        }



On Sep 15, 5:22 am, brian <[email protected]> wrote:
> On Mon, Sep 14, 2009 at 9:48 AM, cakephp_rocks
>
> <[email protected]> wrote:
>
> > this is in my app controller
>
> > function beforeFilter( ) {
> >        parent::beforeFilter();
> >                $this->Auth->loginAction = array('admin' => false, 
> > 'controller' =>
> > 'users', 'action' => 'login');
> >                $this->Auth->loginRedirect = '/';
> >                $this->Auth->logoutRedirect = '/';
>
> Sorry, I missed this thread. Do you also have your own login() method
> in UsersController or are you just going with Cake's default action?
--~--~---------~--~----~------------~-------~--~----~
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