check user status after login

Hi everyone!

I’m trying to switch to YII now so I do have some questions.

Probably a silly question - How can I check if user is enabled or disabled after auth? I don’t want check it in every controller but in a single piece of code.

Thanks

An alternative to add code in every controller is to declare your own base controller by extending CController.

Edit:

You can put the base controller class file in protected/components (or some ather imported directory, see config). Don’t forget to inherit your other controllers from your base controller.

/Tommy

Solved it by extending CWebUser and overloading checkAccess()