| xqd
@@ -5,6 +5,7 @@ namespace App\Http\Controllers\Api;
|
|
|
use App\Exceptions\SmsException;
|
|
|
use App\Models\AdminRole;
|
|
|
use App\Models\User;
|
|
|
+use App\Models\UserInfoModel;
|
|
|
use App\Models\UserInviteLog;
|
|
|
use App\Services\SmsService;
|
|
|
use App\Services\TencentImAccountService;
|
| xqd
@@ -66,6 +67,10 @@ class AuthorizationsController extends Controller
|
|
|
if (!$user->ycode) {
|
|
|
$user->ycode = $this->create_code();
|
|
|
}
|
|
|
+ if(!UserInfoModel::query()->where('user_id',$user->id)->first()){
|
|
|
+ UserInfoModel::query()->firstOrCreate(['user_id'=>$user->id]);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
if (!$user->tencent_im_user_id) {
|
|
|
$user->tencent_im_user_id = $this->tencentImAccountService->accountImport($user);
|
| xqd
@@ -140,6 +145,9 @@ class AuthorizationsController extends Controller
|
|
|
if($user->status!=1){
|
|
|
return $this->response->errorForbidden("用户已被禁用,请联系管理员");
|
|
|
}
|
|
|
+ if(!UserInfoModel::query()->where('user_id',$user->id)->first()){
|
|
|
+ UserInfoModel::query()->firstOrCreate(['user_id'=>$user->id]);
|
|
|
+ }
|
|
|
|
|
|
if (!$user->ycode) {
|
|
|
$user->ycode = $this->create_code();
|