...
|
...
|
@@ -42,6 +42,12 @@ class User extends Backend |
|
|
{
|
|
|
if ($this->request->isPost()) {
|
|
|
$params = $this->request->post("row/a");
|
|
|
$product_id = null;
|
|
|
if(isset($params['product_id']) && !empty($params['product_id'])){
|
|
|
$product_id = $params['product_id'];
|
|
|
unset($params['product_id']);
|
|
|
}
|
|
|
|
|
|
if ($params) {
|
|
|
if ($this->dataLimit && $this->dataLimitFieldAutoFill) {
|
|
|
$params[$this->dataLimitField] = $this->auth->id;
|
...
|
...
|
@@ -66,8 +72,7 @@ class User extends Backend |
|
|
|
|
|
$result = $this->model->allowField(true)->insert($params,false,true);
|
|
|
if ($result !== false) {
|
|
|
if(isset($params['product_id']) && !empty($params['product_id'])){
|
|
|
|
|
|
if($product_id){
|
|
|
$product = new \app\admin\model\Product();
|
|
|
$product = $product->where(['id'=>$params['product_id']])->find();
|
|
|
if(!empty($product)){
|
...
|
...
|
|