edit the admin and user privileges

I created an automatic webapp called test … I need to use the information in admin table instead of demo demo and admin admin … and i need to change the authentication in some pages to let users login not just admins … how can i do that ?

and for users i have table called Product and i need the crud operation for the user to be just for the products created by his ID … where can i add this role ?

and thanks in advance :)

Go and have a look to the UserIdentity class under your protected/components. The authenticate function is what you need to look at.

As for the CRUD, that is an easy task, force a criteria to display only the products related to the user logged in.

By the way, welcome to the forum

Thank you very much Mr. Ramirez

I found an extension called “yii-user” and it’s all what I want :)

Another question: If I want to add another language to Yii … “Arabic” … what should I do to add new language and of course with it’s own CSS (because Arabic is right-to-left language). but in the same time I want English to be the default language.

You need to have a look on how Translations work and then change Locale according to user selection.