예제 #1
0
파일: user.php 프로젝트: JefferyWong/adapi
 $user_info = $em->getRepository('App\\Model\\Userinfo')->find($user_id);
 if (!$user_info) {
     $user = $em->getRepository('App\\Model\\User')->find($user_id);
     if (!$user) {
         $app->response->headers->set('Content-Type', 'application/json');
         echo Util::resPonseJson($app, 4004, "用户未注册", array());
         exit;
     }
     $user_info = new UserInfo();
     $user_info->setUser_id($user->getId());
 }
 if ($address != '') {
     $user_info->setAddress($address);
 }
 if ($education != '') {
     $user_info->setEducation($education);
 }
 if ($religion != '') {
     $user_info->setReligion($religion);
 }
 if ($bloodtype != '') {
     $user_info->setBloodtype($bloodtype);
 }
 if ($tall != '') {
     $user_info->setTall($tall);
 }
 if ($weight != '') {
     $user_info->setWeight($weight);
 }
 if ($is_have_baby != '') {
     $user_info->setIs_have_baby($is_have_baby);