Simple question - How to grant one user admin privilege

I remember that when i first installed Yii I could use username admin pswd admin as admin user, but now I use database, I haven’t any idea on how to grant admin privilege to a user.

Could anyone help me out with this simple question please?

Hi,

check this topic. It should help.

You can do it using expression in access.

Define a function in the user model which checks the database value that you have set for admin, for example level or super_user, is_admin or what ever. And call this function in the access rules using expression

Thank you mates. I’ll try it.