public function actionFriendRequest($id) { /* if($id == Yii::app()->user->id) { return; }*/ $message = $_POST['message']; Friend::CreateRequest(Yii::app()->user->id, $id, $message); $this->redirect(array('/user/view', 'id' => $id)); }