User Model Vs User Model In Modules


I’m using user management module in my project that has a user AR model in (modules/user


my question is:

when i’m going to use user info from db, i shoud use (protected/modules/user/models

/users.php) or create own user model AR in (protected/models/user.php)and put my

function in this model(such as get user role , get attribute value and save attributes).

You can use that model, just import the class using “Yii::import” or add it in the config file. But if you’d want to make changes to it I would use my own extending it not to alter the module. Just name it a little bit different to avoid class name conflict.