views:

108

answers:

1

Hello,

I just started to learn CakePHP and i'm trying to make the homepage (views\pages\home.ctp) only available to logged users, so if an unlogged users enter to the homepage they should be redirected to Users controller, where it prompts for user data, using Auth Component.

Where I can set the "controller" for the homepage? please correct me if i'm using the wrong terms :)

Thanks

A: 

this is normally done with the authorization component and a beforeFilter in the app controller.

here's a good example:

http://www.milesj.me/blog/read/5/Using-CakePHPs-Auth-Component

jspcal
beforeFilter did the trick ;) thanks
Korrupzion