1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-13 22:54:25 +01:00

return early if user does not have a refresh token

This commit is contained in:
David Bomba 2023-03-03 10:59:21 +11:00
parent 0828ff9ce6
commit 57c98780cf

View File

@ -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') ,