cakephp - Login takes away the slug from my URL -
i'm working cake 2.1.3, , routes.php file, worked fine except login management, example want url follows:
http://mysite.com/companyx/users/login
where companyx slug, when run url in browser follows:
in file routes.php have defined 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 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 ;)
cakephp has default login action defined in authcomponent. (line 171)
/** * url (defined string or array) controller action handles * logins. defaults `/users/login` * * @var mixed */ public $loginaction = array( 'controller' => 'users', 'action' => 'login', 'plugin' => null );
you can override action beforefilter in own userscontroller.
Comments
Post a Comment