thanks for you answer. I solved this case this way:
public function beforeFilter() {
parent::beforeFilter();
if (!$this->request->is('post')) {
$this->Auth->loginAction = 'this is:slug/users/login/';
}
}
Where "this is slug", should be the slug.
Best Regards.
El domingo,
If it were so, you could do $this->Auth->loginRedirect = $this->referer()
in your app's beforeFilter...
On Saturday, 7 July 2012 20:02:17 UTC+2, cricket wrote:
>
> I think Cake might be redirecting to Auth's loginAction that is set in
> AppController.
>
> Maybe you should drop the slug part fro
I think Cake might be redirecting to Auth's loginAction that is set in
AppController.
Maybe you should drop the slug part from the URL and just fetch the
company slug after login and redirect. Presumably, once logged in
you'll need to implement isAuthorized() in the controller to match the
company
I'm working Cake 2.1.3, and the routes.php file, everything worked fine
except the login management, for example I want my url be as follows:
http://mysite.com/companyx/users/login
where companyx is the slug, however when you run that url in the browser is
as follows:
http://mysite.com/users