Hi,
I want to be able to check if the user is logged in for all controller actions. The reason I want to do this is that for a user to be able to use a site, he must be logged on at all cases. No anonymous access is allowed. I have tried to override the run() method of my controller and it seems to work:
This snippet works. Two questions:
-
Is overriding the run() method of each controller the correct way?
-
Is there somewhere where I can execute my custom code for all controllers in the site?
Thanks.