CActiveRecord.setAttributes

Hi

I was wondering if it was possible to modify the setAttributes method to allow passing in an array of allowed attributes to be set. Like

CActiveRecord.setAttributes($_POST['User'],true, array('name','email'))

I know you can exclude a particular number of attributes using the "protectedAttributes"  method but the attributes you may want to allow to be set could be different based on the role of the person, or even the state of the record. So the controller should also be allowed to specify which attributes may be updated.

nz

Good suggestion. Done.