Commit 59e21c17 by 杨昕

修改更新token,bug

parent 28f4ce5f
Pipeline #9959 passed with stages
in 35 seconds
...@@ -109,7 +109,6 @@ class UsersController extends Controller ...@@ -109,7 +109,6 @@ class UsersController extends Controller
'organization_id' => 0, 'organization_id' => 0,
'status' => 0, 'status' => 0,
'create_time' => date('Y-m-d H:i:s',time()), 'create_time' => date('Y-m-d H:i:s',time()),
'user_type' => 0
]; ];
$user = DB::connection('mongodb') //选择使用mongodb $user = DB::connection('mongodb') //选择使用mongodb
...@@ -117,8 +116,10 @@ class UsersController extends Controller ...@@ -117,8 +116,10 @@ class UsersController extends Controller
$token = $this->generateToken(); $token = $this->generateToken();
if (!empty($user)){ if (!empty($user)){
$data['user_type'] = $user['user_type'];
$idArr = ($user['_id'])->jsonSerialize(); $idArr = ($user['_id'])->jsonSerialize();
}else{ }else{
$data['user_type'] = 0;
$id = DB::connection("mongodb")->collection("users")->insertGetId($data); $id = DB::connection("mongodb")->collection("users")->insertGetId($data);
if (!$id){ if (!$id){
......
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