Fix
This commit is contained in:
parent
d47b8961ce
commit
17d4fd2306
|
@ -201,11 +201,15 @@ class Connect
|
|||
$connect_data['expires_at'] = $expires_at->addSeconds($connect_data['expires_in']);
|
||||
|
||||
$model_data = $this->getUserData($connect_data['access_token']);
|
||||
$model = config('bconnect.model');
|
||||
|
||||
$this->sync('User', $model_data['id']);
|
||||
$user = $model::where('email', $model_data['email'])->first() ?? new $model;
|
||||
$user->fill($model_data);
|
||||
|
||||
$model = $this->synchronized['User'];
|
||||
$user = $model::findOrFail($model_data['id']);
|
||||
if (in_array($model, $this->synchronized))
|
||||
$user->id = $model_data['id'];
|
||||
|
||||
$user->save();
|
||||
|
||||
$this->updateUserConnectData($user, $connect_data);
|
||||
|
||||
|
|
Loading…
Reference in New Issue