Yii-User Extension: Adding New Fields To User Profile?

I am using the yii-user extension and like it a lot, but I want to modify the basic user profiles so instead of just having first name, last name, and email, I’d like to have other values (including integer-based values as well as more string-based ones).

As I was writing this, I did find out how to add new profile fields: under profile tab -> manage users -> manage profile field -> create profile field. I added one, and it did show up in the database, but when I click on “list users” and “manage users”, I don’t see that field. How can I make a field visible/searchable by admins, as well as by regular users? Is there a “list profiles” option that I’m unaware of?

There are two ways that I think can solve your problem. First is to edit the appropriate controllers, models and views in the extension to display the related data. (controllers/AdminController.php, models/User.php, and views/admin/*).

I wouldn’t do that though. If the extension is updated, you’d have to make all the changes again.

What I have done in the past is set up all of the fields and how I want them used. Then used Gii to create my own models and controllers of the users/profiles table and modified those accordingly. These are kept totally separate from the extension and do not effect it in any way. I hope that helps.