...
|
...
|
@@ -94,12 +94,12 @@ class HouseAdmin extends Backend |
|
|
}
|
|
|
$result = $this->model->allowField(true)->save($params);
|
|
|
|
|
|
// $house_admin_id = $this->model->getLastInsID();
|
|
|
//
|
|
|
// $data = Db::name('house_admin')->where('id',$house_admin_id)->find();
|
|
|
// if(!empty($data['user_id'])){
|
|
|
// Db::name('user')->where('id',$data['user_id'])->update(['identity'=>1]);
|
|
|
// }
|
|
|
$house_admin_id = $this->model->getLastInsID();
|
|
|
|
|
|
$data = Db::name('house_admin')->where('id',$house_admin_id)->find();
|
|
|
if(!empty($data['user_id'])){
|
|
|
Db::name('user')->where('id',$data['user_id'])->update(['identity'=>1]);
|
|
|
}
|
|
|
|
|
|
Db::commit();
|
|
|
} catch (ValidateException $e) {
|
...
|
...
|
|