Add More Fields In Profile Table

Hi All,

I want to create new user(yii-user extention) with profile fields like:




$NewOperator = new User();

$NewOperator->username = $username;

$NewOperator->email = $email;

...

$ret= $NewOperator->save(false);

if ($ret) {

  $NewOperatorProfiles = new Profile();

  $NewOperatorProfiles->user_id = $NewOperator->id;

  $NewOperatorProfiles->first_name = $first_name; // Debugging I see that $first_name and $last_name filled  

  $NewOperatorProfiles->last_name = $last_name;

  $NewOperatorProfiles->save(false);



New user and profiles rows are added, but first_name and last_name in Profiles table are empty.

Wath is the matter ? Also I want to add more fields like birthday, location … Which is the best way of adding/reading/writing these fields?

Check the data type of the field in the database?

cant really say much else from the info you gave gl