Commit b6bd217c authored by wuxiaoli's avatar wuxiaoli

no message

parent 395d176c
......@@ -99,7 +99,6 @@ class Family extends Backend
}
$params['family_name']=\app\admin\model\family\Surname::where(['ID'=>$params['surname_id']])->value("Surname");
$params['rw_user_id']=$params['create_user_id'];
$result = $this->model->allowField(true)->save($params);
Db::commit();
} catch (ValidateException $e) {
......
......@@ -157,6 +157,7 @@ class Family extends Api
$params['address']=$this->request->param("address");
$params['create_user_id']=$this->auth->id;
$params['rw_user_id']=$this->auth->id;
$params['ro_user_id']=$this->auth->id;
$params['fastim_id']=$this->request->param("fastim_id");
$params['genealogy']=$this->request->param("genealogy");
if(xss_clean($this->request->param("family_regulation"))){
......@@ -338,12 +339,13 @@ class Family extends Api
FamilyModel::where(['id' =>$family_id])->setInc('read_records',1);
}
$info['rw_user_id'] = explode(",",$info['rw_user_id']);
$info['ro_user_id'] = explode(",",$info['ro_user_id']);
$info['is_show'] = false;
$familyTreePeople=FamilyTreeModel::myFamilyTreePeople(["ft.family_id"=>$family_id,'fp.user_id'=>$this->auth->id]);
if(in_array($this->auth->id,$info['rw_user_id']) || $familyTreePeople ){
if(in_array($this->auth->id,$info['rw_user_id']) || $familyTreePeople || in_array($this->auth->id,$info['ro_user_id'])){
$info['is_show'] = true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment