What I’d like to do is, in the beforeAction() function in Controller I’d like to check that the user not a guest before letting them proceed. What I’m thinking of doing is putting code in the beforeAction function that looks something like this (pseudo code)
public function beforeAction()
{
if(action is not login)
{
check if user is guest, if they are throw exception telling them to login first, if not let them proceed
}
}
Hope that makes sense. So is there a way I can check if the action being performed is login, as in get the action id or something? Or is there a better way to do what I’m trying…probably.