public function actionSaveCall() { $user = User::model()->find('id=:id', array(':id' => Yii::app()->user->id)); $user_name = $user['first_name'] . ' ' . $user['last_name']; $id = $_POST['id']; $comment = $_POST['comment']; $post = Carrier::model()->findByPk($id); $post->Comment = $comment . '( ' . $user_name . ')'; $post->Last_Activity_Date = date('Y-m-d'); $post->save(); $reports = new UserReports(); $reports->client_id = (int) $id; $reports->user_id = (int) Yii::app()->user->id; $reports->action = 1; $reports->comment = $comment; $reports->date = date('Y-m-d'); $reports->save(); $model = new Carrier('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Carrier'])) { $model->attributes = $_GET['Carrier']; } $this->render('admin', array('model' => $model)); }