1
0
Fork 0

user_socialte

master
panliang 2023-10-16 15:48:11 +08:00
parent 0cf776decd
commit 75a42c9846
1 changed files with 4 additions and 0 deletions

View File

@ -49,6 +49,10 @@ class AuthController extends AdminAuthController
$openid = $request->input('openid');
$open_type = $request->input('open_type');
if ($openid && $open_type) {
UserSocialite::where([
'type' => SocialiteType::from($open_type),
'user_type' => $user->getMorphClass(),
])->update(['user_id' => null]);
UserSocialite::updateOrCreate([
'type' => SocialiteType::from($open_type),
'user_type' => $user->getMorphClass(),