I have some basic user task I need…
-
check that authKey + ip + agent correct + role!=banned
-
get user balance (money amount) + his email, id etc.
balance can change any second… so I must reload it
Where is the best place to get thous?
now I’m using beforeAction in Controller
if(!$app->user->isGuest && !$app->errorHandler->error ){
//get the data via DAO
}
Because now I load it every time, I use dao… cause AR without cache is true memory eater…
So… I doing it right?