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 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 slug in later URLs to ensure that the user's company matches. 
>
> On Fri, Jul 6, 2012 at 7:37 PM, Ricardo Cortés 
> <[email protected]> wrote: 
> > 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/login 
> > 
> > In this file routes.php I have defined as follows: 
> > 
> > Router::connect( 
> >         '/:slug/users/login', // E.g. /companyx/users/login 
> >         array('controller' => 'users', 'action' => 'login'), array( 
> >         // order matters 
> >         'pass' => array('slug') 
> >         ) 
> >     ); 
> > 
> > With other controllers I have no problems such as: 
> > 
> > Router::connect( 
> >         '/:slug/users', // E.g. /companyx/users 
> >         array('controller' => 'users', 'action' => 'index'), array( 
> >         // order matters 
> >         'pass' => array('slug') 
> >         ) 
> >     ); 
> > 
> > Best Regards ;) 
> > 
> > -- 
> > Our newest site for the community: CakePHP Video Tutorials 
> > http://tv.cakephp.org 
> > Check out the new CakePHP Questions site http://ask.cakephp.org and 
> help 
> > others with their CakePHP related questions. 
> > 
> > 
> > To unsubscribe from this group, send email to 
> > [email protected] For more options, visit this 
> group at 
> > http://groups.google.com/group/cake-php 
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to