return early if user does not have a refresh token
This commit is contained in:
parent
0828ff9ce6
commit
57c98780cf
1 changed files with 3 additions and 0 deletions
|
|
@ -584,6 +584,9 @@ class NinjaMailerJob implements ShouldQueue
|
|||
$guzzle = new \GuzzleHttp\Client();
|
||||
$url = 'https://login.microsoftonline.com/common/oauth2/v2.0/token';
|
||||
|
||||
if(!$user->oauth_user_refresh_token || $user->oauth_user_refresh_token == '')
|
||||
return false;
|
||||
|
||||
$token = json_decode($guzzle->post($url, [
|
||||
'form_params' => [
|
||||
'client_id' => config('ninja.o365.client_id') ,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue