If I understand your needs you may use $this->params of controller.
pr($this->params); // when accessed as /users/register
Array
(
[pass] => Array
(
)
[named] => Array
(
)
[controller] => users
[action] => register
[plugin] =>
[url] => Array
(
[ext] => html
[url] => users/register
)
[form] => Array
(
)
[isAjax] =>
)
pr($this->params); // when accessed by route as /signon
Array
(
[pass] => Array
(
)
[named] => Array
(
)
[plugin] =>
[controller] => users
[action] => register
[url] => Array
(
[ext] => html
[url] => signon
)
[form] => Array
(
)
[isAjax] =>
)
On Sep 13, 9:10 pm, Greg Skerman <[email protected]> wrote:
> Hi,
>
> I'm building an auth system simillar to authake, which matches the current
> URL to a regular expression to determine if access allowed or not.
>
> For simplicities sake I need it to be routes aware, i.e. if controller
> "pages" and action "view" and parameter "home" routes to /page/home i need
> /page/* to be accepted by my authentication system rather than the full
> controller/action/parameter. This will be especially useful with site admin
> as I can allow /admin/* for all admin actions, instead of having to have
> /controller/admin_* defined for each controller being used.
>
> Is there a way to pass the URL and return the controller and view it routes
> to? if so can somebody point me in the right direction?
>
> Hope this makes sense :S
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
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