Thursday, October 18, 2012

Re: Routing Issue

Router::connect('/users/login', array('controller'=>'users', 'action'=>'login', 'prefix'=>'admin')); 

All users will login through the admin_login function, from which you could redirect them to the proper prefix (manager), although I didn't test this.

On Thursday, October 18, 2012 7:21:34 AM UTC+2, advantage+ wrote:

I have 3 different Admin routes defined. admin / manager / editor

 

Now just testing a few things, so not logged in I try to access a restricted admin url.

But it redirects me to {url}/admin/users/login

 

How can I get it so it redirects to {url}/users/login?

I need to drop the admin, or other possible defined admin routes

 

In AppController:

'loginAction' => array('controller' => 'users','action' => 'login', 'admin' => false)

 

In the controller:

public function beforeFilter() {

                parent::beforeFilter();

                $this->Auth->deny();

                $this->Auth->redirect();

}

 

Any ideas where I am going wrong?

 

Thanks,

Dave

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
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+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate