mirror of
https://github.com/bitinflow/accounts.git
synced 2026-03-13 13:35:52 +00:00
Update BitinflowAccountsSsoUserProvider.php
This commit is contained in:
@@ -47,6 +47,8 @@ class BitinflowAccountsSsoUserProvider implements UserProvider
|
||||
->where($model->getAuthIdentifierName(), $identifier)
|
||||
->first();
|
||||
|
||||
// Return user when found
|
||||
if ($user) {
|
||||
// Update access token when updated
|
||||
if ($this->accessTokenField) {
|
||||
$user[$this->accessTokenField] = $token;
|
||||
@@ -56,12 +58,11 @@ class BitinflowAccountsSsoUserProvider implements UserProvider
|
||||
}
|
||||
}
|
||||
|
||||
if ($user) {
|
||||
return $user;
|
||||
}
|
||||
|
||||
// Create new user
|
||||
$this->bitinflowAccounts->setToken($token);
|
||||
|
||||
$result = $this->bitinflowAccounts->getAuthedUser();
|
||||
|
||||
if (!$result->success()) {
|
||||
|
||||
Reference in New Issue
Block a user