On 9/30/06, kristian <[EMAIL PROTECTED]> wrote:

Thanks for the reply John; however it doesnt work as I expected!

I came up with this:
$Route->connect('/', array('controller' => 'pages', 'action' =>
'display', '../users/login'));

This now displays my login page using:
http://www.domain.com/cake/

But i get an error regarding the 'error' variable from the
users_controller.php:
Notice: Undefined variable: error in
/home/cake/public_html/cake/app/views/users/login.thtml on line 1


The router you defined above is using the static pages controller and is therefore not setting the expected variables to render the login view properly.

The users controller sets those variables and passes them to the view before rendering.  So your route should look like this....

$Route->connect('/', array('controller' => 'users', action ="" 'login'));

If that doesn't work something is wrong.  Let us know what happens to isolate the problem.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to