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,21 +47,22 @@ class BitinflowAccountsSsoUserProvider implements UserProvider
|
|||||||
->where($model->getAuthIdentifierName(), $identifier)
|
->where($model->getAuthIdentifierName(), $identifier)
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
// Update access token when updated
|
// Return user when found
|
||||||
if ($this->accessTokenField) {
|
|
||||||
$user[$this->accessTokenField] = $token;
|
|
||||||
|
|
||||||
if ($user->isDirty()) {
|
|
||||||
$user->save();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($user) {
|
if ($user) {
|
||||||
|
// Update access token when updated
|
||||||
|
if ($this->accessTokenField) {
|
||||||
|
$user[$this->accessTokenField] = $token;
|
||||||
|
|
||||||
|
if ($user->isDirty()) {
|
||||||
|
$user->save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $user;
|
return $user;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Create new user
|
||||||
$this->bitinflowAccounts->setToken($token);
|
$this->bitinflowAccounts->setToken($token);
|
||||||
|
|
||||||
$result = $this->bitinflowAccounts->getAuthedUser();
|
$result = $this->bitinflowAccounts->getAuthedUser();
|
||||||
|
|
||||||
if (!$result->success()) {
|
if (!$result->success()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user