What Info Can Be Accessed Using Yii::app()->User

I am working on a hobby project where current name of module user is using is stored in another table without any relation between tables.

is it possible to get the name or id of module being used by using Yii::app()->user->modulename

I know that Yii::app()->user store user session info but no idea if it can be used for above purpose.

Thanks

Information you need is stored in controller component. You can access current module by:


Yii::app()->controller->module

so it’s id can be acquired by:


Yii::app()->controller->module->id