正在显示
1 个修改的文件
包含
4 行增加
和
0 行删除
@@ -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 | } |
-
请 注册 或 登录 后发表评论