How to call function of other module in another controller

i have one controller CompanyController.In which i want to call function of UserModule.

For that i write


Yii::app()->getModule('User')->encrypting($model_user->password);

But it gives me error




Call to a member function encrypting() 



Whats wrong?

I think you should use Yi::import, for example:


Yii::import('application.modules.blog.models.Post');