Please help me…
Why my code is not saiving the new value in database?
public function activate($ekey) {
$model = RciUsers::model()->findByAttributes(array('user_salt' => $ekey));
if ($model === null) {
return false;
} else {
if ($model->user_activation == 'INVALID') {
$model->user_activation = 'VALID';
$model->save();
}
$headers = "From: www.references.ro/rci" . "\r\nReply-To: " . Yii::app()->params['adminEmail'];
$body = "";
$body .= "Mulţumim pentru inregistrare!\r\n";
$body .= "Informaţiile completate de dumneavoastră sunt:\r\n";
$body .= "User Name: ";
$body .= $model->user_email;
$body .= "\r\n";
$body .= "Pentru neclarităţi vă rugăm să completaţi formularul de contact de la adresa www.references.ro.";
mail(Yii::app()->params['adminEmail'], "Informaţii contact - Cont Nou - REFERENCES.RO", $body, $headers);
mail($model->user_email, "Informaţii contact - Cont Nou - REFERENCES.RO", $body, $headers);
return true;
//}
}
}