Yii Framework Forum: Implement User Management System - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Implement User Management System Rate Topic: -----

#1 User is offline   za_al 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 53
  • Joined: 06-March 12

Posted 15 August 2013 - 12:42 PM

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.
0

#2 User is offline   nineinchnick 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 622
  • Joined: 12-September 11
  • Location:Bialystok, Poland

Posted 15 August 2013 - 01:49 PM

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.
Don't be a dick.
0

#3 User is offline   za_al 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 53
  • Joined: 06-March 12

Posted 17 August 2013 - 12:24 AM

View Postnineinchnick, on 15 August 2013 - 01:49 PM, said:

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.



Hi

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

tanks
0

#4 User is offline   nineinchnick 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 622
  • Joined: 12-September 11
  • Location:Bialystok, Poland

Posted 17 August 2013 - 11:26 AM

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.
Don't be a dick.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users