作者 xwp
1 个管道 的构建 通过 耗费 8 秒

后台修改

@@ -65,8 +65,11 @@ class User extends Backend @@ -65,8 +65,11 @@ class User extends Backend
65 if(empty($user)){ 65 if(empty($user)){
66 $params['is_default'] = true; 66 $params['is_default'] = true;
67 }else{ 67 }else{
  68 + $user = $user->toArray();
68 if(empty($user['username']) || empty($user['nickname'])){ 69 if(empty($user['username']) || empty($user['nickname'])){
  70 + $this->model->where(['id'=>$user['id']])->delete();
69 $params['is_default'] = true; 71 $params['is_default'] = true;
  72 + $params['openid'] = $user['openid'];
70 } 73 }
71 } 74 }
72 75
@@ -329,6 +332,7 @@ class User extends Backend @@ -329,6 +332,7 @@ class User extends Backend
329 $v['is_default'] = true; 332 $v['is_default'] = true;
330 }else{ 333 }else{
331 if(empty($user['username']) || empty($user['nickname'])){ 334 if(empty($user['username']) || empty($user['nickname'])){
  335 + $this->model->where(['id'=>$user['id']])->delete();
332 $v['is_default'] = true; 336 $v['is_default'] = true;
333 } 337 }
334 } 338 }