public function record() { $user = Yii::$app->session->get('user'); $info = Info::findRefusedByUserId($user['userId']); if (!$info) { $info = new Info(); $info->password = CommonFunctions::createRandPassword(); } $info->userId = $this->userId; $info->IDCard = $this->IDCard; $info->realName = $this->realName; $info->cellphone = $this->cellphone; $info->education = $this->education; $info->major = $this->major; $info->workTime = $this->workTime; $info->technical = $this->technical; $info->signUpMajor = $this->signUpMajor; $info->company = $this->company; $info->findPasswordQuestion = $this->findPasswordQuestion; $info->findPasswordAnswer = $this->findPasswordAnswer; $info->headImg = $this->headImg; $info->educationImg = $this->educationImg; $info->createDate = DateFunctions::getCurrentDate(); $info->state = Info::STATE_RECORD; if (!$info->save()) { throw new Exception("Sign Up Info save error"); } }