Hello !!! Here, I am going to ask you again a silly and stupid question. But as a newbie, I am not getting it pretty well. I have a webpage and a table named ‘Users’. I have used this table ‘Users’ to register, login and do the rest of the work. Now, I need the a separate role (‘Admin’ role) to manage/control some things .
Now, the question is :
While registering a user in ‘Users table’. I want to give user a role -> Admin.
While logging from ‘Users table’, it will check whatever he/she is admin or not ? if Admin then ‘isadmin’ function will be used to show some url/menu -> how it can be done ?
Right now i am using this : allow(‘user1_name’, ‘user2_name’);
But, so if the ‘admin’ role is enabled then will this work : allow(‘admin’) ?
My current option:
Yiii-user-management : tried, but did not install or whatever, I do not know
Yii-User : did not install.
Using auth: trying, still having problem
create webuser page extends cwebuser : giving error
What will be the easiest way to give a user ‘Admin’ role and how to use the role in allow() and ‘isadmin’ ?
If you know the way, please give me every step by step part to proceed.
Thanks for reading, any feedback will be a big help for this newbie.