User system


I have a table where I have some "Players", with their player name, player position, goals, etc; and I would like to associate it somehow with a password and a username to enter the Yii system. Basically, I want both together, as I would like a kind of a role-system therefore the users could

  • be SuperAdmins

  • be Team Manager

  • be just Players

What is the best way to achieve something like this?


Anyone did something similar?

You should read through the guide section on RBAC:

There are extensions you could use, such as rights, but that’s probably overkill for your needs.

For small sites,there is no need for RBAC.

You can create a column named “role” in ‘User’ table.

After registration you can assign different roles to registered user.

You have to redefine various actions in ‘UserController’ by adding some logic

based on $user->role;

I’ve read RBAC and rights, but I think that does not fit my question.

What I was needing was a kind of accessing the users table with some other fields…

try yii-user module or usergroups module…