form fields based on user

Hi.

On user create gii code, i would like to change the code to not show some fields in _form view.

ex= show id only is user logged in is admin user

Thanks

http://www.yiiframework.com/forum/index.php?/topic/25909-how-to-toggle-column-visibility-in-cgridview/

This can be done by setting variables in your UserIdentity class on login.

However, you need to think about how you will handle validation rules on form submission. For instance, how will you handle required fields that you display to only certain users?

For that reason I would consider separating admin functionality from user.

Use RBAC?