Implement User Management System

Hi all

I want implement user management system. I have 2 choice:

1- use some extention such as Yii-user-Managenment extention

2- write own module

some advantage of using this extention is:

1- more features

2- better coding

but disadvantage of using extention :

1- this is huge code that I am not familiar it . so, i can’t debug and extend it as well as module that I have writen.

2- Yii-user-Managenment extention don’t use AuthAssignment ,AuthItem,AuthItemChild

tables .so i can’t use yii core class such as CDbAuthManager.

please guide me to select best solution.

I’ve taken the road to write my own and it’s called usr. It’s very basic but I tried to write it as cleanly as possible.

It lacks CRUD for user for an admin user, but that is on purpose. Such CRUD is easy to build and this allows to better integrate it into your own projects.

I think the most important feature is that all logic is inside the UserIdentity class which you have to implement. This allows not to be forced to modify existing User model and/or database tables.


tanks for your reply and good module. :)

I have another question:

suppose i am using user modules in my project. I need to use user class in own project(such as protected/models or protected/controller) . wich choice is better ?

1- using User model in module

2-create new CActiverecord user in own project


That’s the main reason why I wrote this module, to avoid forcing to use a model provided with the module.

I provide only an example to be used in new projects. If you have an existing project or are building a project on top of an existing database schema it’s hard to modify your user table. Sometimes it’s not even possible as it would break other software using same database.

That’s why you only have to implement all needed interfaces in the UserIdentity class. It’s a bridge to YOUR User module.